16 types derived from Task
System.Private.CoreLib (16)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (1)
750private 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)
416Task<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)
1352Task<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)
619return m_task = new Task<TResult>(); 701Task<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);
15928 references to Task
aspire (1009)
Acquisition\IInstallationDiscovery.cs (1)
42Task<IReadOnlyList<InstallationInfo>> DiscoverAllAsync(CancellationToken cancellationToken);
Acquisition\InstallationDiscovery.cs (2)
116public Task<IReadOnlyList<InstallationInfo>> DiscoverAllAsync(CancellationToken cancellationToken) 125internal async Task<IReadOnlyList<InstallationInfo>> DiscoverAllAsync(string? processPath, CancellationToken cancellationToken)
Acquisition\IPeerInstallProbe.cs (1)
38Task<PeerProbeResult> ProbeAsync(string binaryPath, CancellationToken cancellationToken);
Acquisition\PeerInstallProbe.cs (8)
67public async Task<PeerProbeResult> ProbeAsync(string binaryPath, CancellationToken cancellationToken) 198private async Task<SpawnResult> SpawnAndCaptureAsync(string binaryPath, string[] arguments, CancellationToken cancellationToken) 327private static async Task<PeerProcessOutput> CapturePeerOutputAsync(Process process, CancellationToken cancellationToken) 329var readStdoutTask = ReadCappedAsync(process.StandardOutput.BaseStream, OutputCap, cancellationToken); 330var readStderrTask = ReadCappedAsync(process.StandardError.BaseStream, OutputCap, cancellationToken); 347private static async Task<CappedOutput> ReadCappedAsync(Stream stream, int cap, CancellationToken cancellationToken) 437private static async Task<CappedOutput> SwallowAsync(Task<CappedOutput> task)
Agents\AgentEnvironmentDetector.cs (1)
12public async Task<AgentEnvironmentApplicator[]> DetectAsync(
Agents\AspireSkills\AspireSkillsBundle.cs (1)
30public Task<IReadOnlyList<SkillAssetFile>> GetSkillFilesAsync(SkillDefinition skill, CancellationToken cancellationToken)
Agents\AspireSkills\AspireSkillsBundleProvider.cs (4)
25Task<AspireSkillsBundle> CreateAsync( 35Task<AspireSkillsBundle> LoadAsync(DirectoryInfo bundleDirectory, CancellationToken cancellationToken, bool skipCompatibilityCheck = false); 76public async Task<AspireSkillsBundle> CreateAsync( 112public async Task<AspireSkillsBundle> LoadAsync(
Agents\AspireSkills\AspireSkillsInstaller.cs (15)
58public Task<AspireSkillsInstallResult> InstallAsync(CancellationToken cancellationToken) 65private async Task<AspireSkillsInstallResult> InstallCoreAsync(CancellationToken cancellationToken) 83async Task<AspireSkillsInstallResult> CompleteInstallationAsync(AspireSkillsBundle bundle, string archiveSha512) 162private async Task<AcquisitionResult> InstallFromGitHubAsync( 285private async Task<AcquisitionResult> InstallFromEmbeddedAsync( 427private async Task<GitHubReleaseInfo?> TryGetGitHubReleaseAsync(HttpClient httpClient, string version, CancellationToken cancellationToken) 529private static async Task<bool> TryDownloadGitHubAssetAsync(HttpClient httpClient, string downloadUrl, string archivePath, CancellationToken cancellationToken) 552private async Task<AcquisitionResult?> TryLoadCachedBundleAsync( 582private async Task<AcquisitionResult?> TryLoadCachedBundleCoreAsync( 654private async Task<AcquisitionResult?> TryLoadCachedBundleDirectoryAsync( 723private async Task<AspireSkillsBundle> CacheArchiveAsync( 751private async Task<AspireSkillsBundle> CacheStagedBundleAsync( 842private Task<FileStream> AcquireCacheLockAsync(string cacheRoot, string version, CancellationToken cancellationToken) 847private Task<FileStream> AcquireCacheLockForCleanupAsync(string cacheRoot, string version, CancellationToken cancellationToken) 852private async Task<FileStream> AcquireCacheLockCoreAsync(
Agents\AspireSkills\EmbeddedAspireSkillsBundleProvider.cs (2)
23Task<AspireSkillsBundle?> CreateBundleAsync( 51public async Task<AspireSkillsBundle?> CreateBundleAsync(
Agents\AspireSkills\GitHubArtifactAttestationVerifier.cs (2)
18Task<ProvenanceVerificationResult> VerifyAsync( 32public async Task<ProvenanceVerificationResult> VerifyAsync(
Agents\AspireSkills\IAspireSkillsInstaller.cs (1)
14Task<AspireSkillsInstallResult> InstallAsync(CancellationToken cancellationToken);
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\Copilot\CopilotCliRunner.cs (3)
17public async Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken) 42var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 43var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Agents\Copilot\ICopilotCliRunner.cs (1)
18Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken);
Agents\Hooks\ITelemetryHookConfigurator.cs (1)
20Task<TelemetryHookConfigurationResult> ConfigureAsync(
Agents\Hooks\ITelemetryHookInstaller.cs (1)
22Task<TelemetryHookScripts> EnsureInstalledAsync(CancellationToken cancellationToken);
Agents\Hooks\TelemetryHookConfigurator.cs (3)
56public async Task<TelemetryHookConfigurationResult> ConfigureAsync( 124private async Task<bool> TryConfigureCopilotAsync(TelemetryHookScripts scripts, CancellationToken cancellationToken) 164private async Task<TelemetryHookSkipReason?> ConfigureClaudeAsync(TelemetryHookScripts scripts, CancellationToken cancellationToken)
Agents\Hooks\TelemetryHookInstaller.cs (1)
37public async Task<TelemetryHookScripts> EnsureInstalledAsync(CancellationToken cancellationToken)
Agents\IAgentEnvironmentDetector.cs (1)
17Task<AgentEnvironmentApplicator[]> DetectAsync(
Agents\McpConfigFileHelper.cs (1)
69public static async Task<JsonObject> ReadConfigAsync(string configFilePath, Func<string, string>? preprocessContent, CancellationToken cancellationToken)
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 (3)
109public async Task<(PlaywrightInstallStatus Status, string? Message)> InstallAsync(string repoRoot, IReadOnlySet<string> selectedSkillDirectories, CancellationToken cancellationToken) 116private async Task<(PlaywrightInstallStatus Status, string? Message)> InstallCoreAsync(string repoRoot, IReadOnlySet<string> selectedSkillDirectories, CancellationToken cancellationToken) 277private async Task<(PlaywrightInstallStatus Status, string? Message)> InstallAndMirrorSkillsAsync(
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)
108private 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 (21)
132public static Task<AppHostAuxiliaryBackchannel> ConnectAsync( 156internal static Task<AppHostAuxiliaryBackchannel> CreateFromSocketAsync( 165internal static async Task<AppHostAuxiliaryBackchannel> CreateFromSocketAsync( 203var appHostInfoTask = rpc.InvokeWithProfilingAsync<AppHostInformation?>( 212var capabilitiesTask = FetchCapabilitiesAsync(rpc, logger, profilingTelemetry, handshakeCancellation.Token); 253private static async Task<string[]?> FetchCapabilitiesAsync(JsonRpc rpc, ILogger logger, ProfilingTelemetry? profilingTelemetry, CancellationToken cancellationToken) 292public async Task<AppHostInformation?> GetAppHostInformationAsync(CancellationToken cancellationToken = default) 309public async Task<bool> StopAppHostAsync(CancellationToken cancellationToken = default) 336public async Task<DashboardUrlsState?> GetDashboardUrlsAsync(CancellationToken cancellationToken = default) 369public async Task<WaitForAppHostReadyResponse?> WaitForAppHostReadyAsync(CancellationToken cancellationToken = default) 397public async Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(bool includeHidden, CancellationToken cancellationToken = default) 543public async Task<CallToolResult> CallResourceMcpToolAsync( 569public async Task<GetAppHostInfoResponse?> GetAppHostInfoV2Async(CancellationToken cancellationToken = default) 609public async Task<GetDashboardInfoResponse?> GetDashboardInfoV2Async(CancellationToken cancellationToken = default) 654public async Task<GetResourcesResponse> GetResourcesV2Async(GetResourcesRequest? request = null, CancellationToken cancellationToken = default) 910public async Task<CallMcpToolResponse> CallMcpToolV2Async( 961public async Task<bool> StopAppHostV2Async(StopAppHostRequest? request = null, CancellationToken cancellationToken = default) 993public async Task<ExecuteResourceCommandResponse> ExecuteResourceCommandAsync( 1028public async Task<WaitForResourceResponse> WaitForResourceAsync( 1069public async Task<GetTerminalInfoResponse> GetTerminalInfoAsync(string resourceName, CancellationToken cancellationToken = default) 1103public async Task<ListTerminalsResponse> ListTerminalsAsync(CancellationToken cancellationToken = default)
Backchannel\AppHostCliBackchannel.cs (13)
19Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken); 26Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken); 29Task<GetPipelineStepsResponse> GetPipelineStepsAsync(string? step, CancellationToken cancellationToken); 30Task<UploadFileResponse> UploadFileAsync(string filePath, string fileName, int interactionId, string inputName, CancellationToken cancellationToken); 51private Task<JsonRpc> GetRpcTaskAsync() 110public async Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) 153Func<JsonRpc, CancellationToken, Task<IAsyncEnumerable<T>>> startStream, 261Task<JsonRpc>? initialTask = null; 264var currentTask = GetRpcTaskAsync(); 287var rpcTask = GetRpcTaskAsync(); 491public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken) 538public async Task<GetPipelineStepsResponse> GetPipelineStepsAsync(string? step, CancellationToken cancellationToken) 557public async Task<UploadFileResponse> UploadFileAsync(string filePath, string fileName, int interactionId, string inputName, CancellationToken cancellationToken)
Backchannel\AppHostConnectionHelper.cs (1)
27public static async Task<IAppHostAuxiliaryBackchannel?> GetSelectedConnectionAsync(
Backchannel\AppHostConnectionResolver.cs (3)
60public async Task<AppHostConnectionResult[]> ResolveAllConnectionsAsync( 93public async Task<AppHostConnectionResult> ResolveConnectionAsync( 322private async Task<IAppHostAuxiliaryBackchannel?> PromptForAppHostSelectionAsync(
Backchannel\AuxiliaryBackchannelMonitor.cs (1)
365private async Task<IReadOnlyList<Task>> ProcessDirectoryChangesAsync(CancellationToken cancellationToken)
Backchannel\ExtensionBackchannel.cs (16)
36Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull; 37Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull; 38Task<bool> ConfirmAsync(string promptText, bool defaultValue, CancellationToken cancellationToken); 39Task<string> PromptForStringAsync(string promptText, string? defaultValue, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken); 40Task<string> PromptForSecretStringAsync(string promptText, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken); 41Task<string?> PromptForFilePathAsync(string promptText, string? defaultValue, bool directory, CancellationToken cancellationToken); 44Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken); 45Task<bool> HasCapabilityAsync(string capability, CancellationToken cancellationToken); 541public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 571public async Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 601public async Task<bool> ConfirmAsync(string promptText, bool defaultValue, CancellationToken cancellationToken) 625public async Task<string> PromptForStringAsync(string promptText, string? defaultValue, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken) 651public async Task<string> PromptForSecretStringAsync(string promptText, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken) 677public async Task<string?> PromptForFilePathAsync(string promptText, string? defaultValue, bool directory, CancellationToken cancellationToken) 776public async Task<bool> HasCapabilityAsync(string capability, CancellationToken cancellationToken) 782public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
Backchannel\ExtensionRpcTarget.cs (8)
17Task<string> GetCliVersionAsync(); 20Task<ValidationResult?> ValidatePromptInputStringAsync(string input); 26Task<string?> GetDebugSessionIdAsync(); 29Task<string[]> GetCliCapabilitiesAsync(); 39public Task<string> GetCliVersionAsync() 44public Task<ValidationResult?> ValidatePromptInputStringAsync(string input) 57public Task<string?> GetDebugSessionIdAsync() 62public Task<string[]> GetCliCapabilitiesAsync()
Backchannel\IAppHostAuxiliaryBackchannel.cs (11)
55Task<GetAppHostInfoResponse?> GetAppHostInfoV2Async(CancellationToken cancellationToken = default); 77Task<DashboardUrlsState?> GetDashboardUrlsAsync(CancellationToken cancellationToken = default); 84Task<WaitForAppHostReadyResponse?> WaitForAppHostReadyAsync(CancellationToken cancellationToken = default); 92Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(bool includeHidden, CancellationToken cancellationToken = default); 139Task<bool> StopAppHostAsync(CancellationToken cancellationToken = default); 149Task<CallToolResult> CallResourceMcpToolAsync( 161Task<GetDashboardInfoResponse?> GetDashboardInfoV2Async(CancellationToken cancellationToken = default); 171Task<ExecuteResourceCommandResponse> ExecuteResourceCommandAsync( 185Task<WaitForResourceResponse> WaitForResourceAsync( 197Task<GetTerminalInfoResponse> GetTerminalInfoAsync( 208Task<ListTerminalsResponse> ListTerminalsAsync(CancellationToken cancellationToken = default);
Backchannel\OrphanedAppHostCollector.cs (1)
22public async Task<int> CollectAsync(CancellationToken cancellationToken)
Backchannel\ProfilingJsonRpcExtensions.cs (2)
64public static async Task<T> InvokeWithProfilingAsync<T>( 88public static async Task<IAsyncEnumerable<T>> InvokeStreamingWithProfilingAsync<T>(
Backchannel\ResourceWaitService.cs (1)
43public async Task<ResourceWaitResult> WaitAsync(
Bundles\BundleService.cs (5)
101public async Task<BundleLayoutLease?> EnsureExtractedAndAcquireLayoutAsync(string holderKind, string? commandName = null, CancellationToken cancellationToken = default) 148public async Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default) 165private async Task<BundleExtractResult> ExtractAsyncCore(string destinationPath, bool force, CancellationToken cancellationToken) 230private async Task<BundleExtractResult> ExtractCoreAsync(string destinationPath, CancellationToken cancellationToken) 313private async Task<bool> ExtractVersionedLayoutAsync(
Bundles\IBundleService.cs (2)
30Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default); 43Task<BundleLayoutLease?> EnsureExtractedAndAcquireLayoutAsync(string holderKind, string? commandName = null, CancellationToken cancellationToken = default);
Caching\AppHostInfoDiskCache.cs (3)
121public async Task<AppHostInfoCacheEntry?> TryGetAsync(FileInfo projectFile, CancellationToken cancellationToken) 258private async Task<bool> IsDisabledAsync(FileInfo projectFile, CancellationToken cancellationToken) 410Task<AppHostInfoCacheEntry?> TryGetAsync(FileInfo projectFile, CancellationToken cancellationToken);
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\CertificateGeneration\CertificateProcessRunner.cs (3)
22var standardOutputTask = startInfo.RedirectStandardOutput 25var standardErrorTask = startInfo.RedirectStandardError 57private static async Task<string> ReadOutputAsync(StreamReader reader, bool captureOutput, CancellationToken cancellationToken)
Certificates\CertificateService.cs (2)
45Task<EnsureCertificatesTrustedResult> EnsureCertificatesTrustedAsync(CancellationToken cancellationToken); 63public async Task<EnsureCertificatesTrustedResult> EnsureCertificatesTrustedAsync(CancellationToken cancellationToken)
Commands\AddCommand.cs (12)
74protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 448private static async Task<IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>> GetAllPackageVersions(DirectoryInfo workingDirectory, IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> possiblePackages, CancellationToken cancellationToken) 465private async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> GetPackageByInteractiveFlow( 564private async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken) 570private async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, string? configuredChannel, CancellationToken cancellationToken) 576private async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> GetPackageByInteractiveFlowWithNoMatchesMessage( 597Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken); 598Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, string? configuredChannel, CancellationToken cancellationToken); 603public virtual async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, string? configuredChannel, CancellationToken cancellationToken) 613async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForChannelPackagesAsync( 668var rootChoices = new List<(string Label, Func<CancellationToken, Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>> Action)>(); 733public virtual async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken)
Commands\AgentInitCommand.cs (8)
96internal Task<CommandResult> ExecuteCommandAsync(ParseResult parseResult, CancellationToken cancellationToken) 112internal async Task<AgentInitExecutionResult> PromptAndChainAsync( 142protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 152private async Task<DirectoryInfo> PromptForWorkspaceRootAsync(ParseResult parseResult, CancellationToken cancellationToken) 182private async Task<AgentInitExecutionResult> ExecuteAgentInitAsync( 501private async Task<(IReadOnlyList<SkillDefinition> Skills, AspireSkillsBundle? Bundle, string? FailureMessage)> ResolveAvailableSkillsAsync(LanguageId? detectedLanguage, CancellationToken cancellationToken) 658private async Task<SkillInstallResult> InstallSkillAsync( 754private static async Task<IReadOnlyList<SkillAssetFile>> GetSkillFilesAsync(SkillDefinition skill, AspireSkillsBundle? aspireSkillsBundle, CancellationToken cancellationToken)
Commands\AgentMcpCommand.cs (3)
85internal Task<CommandResult> ExecuteCommandAsync(ParseResult parseResult, CancellationToken cancellationToken) 90protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 304private Task<IAppHostAuxiliaryBackchannel?> GetSelectedConnectionAsync(CancellationToken cancellationToken)
Commands\AgentTelemetryCommand.cs (1)
95protected override Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\ApiGetCommand.cs (1)
46protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\ApiListCommand.cs (1)
48protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\ApiSearchCommand.cs (1)
60protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\AppHostLauncher.cs (8)
136public async Task<CommandResult> LaunchDetachedAsync( 429private async Task<LaunchResult> LaunchAndWaitForBackchannelAsync( 497var childExitTask = childProcess.WaitForExitAsync(CancellationToken.None); 547var readinessTask = WaitForAppHostReadyAsync(connection, readinessCts.Token); 750internal static async Task<bool?> WaitForAppHostReadyAsync(IAppHostAuxiliaryBackchannel connection, CancellationToken cancellationToken) 756internal static async Task<bool> WaitForLegacyDetachedStartupStabilityAsync( 785private static async Task<bool> WaitForLegacyDetachedStartupResourceSnapshotProbeAsync( 801Task<List<ResourceSnapshot>> probeTask;
Commands\BaseCommand.cs (5)
75SetAction((Func<ParseResult, CancellationToken, Task<int>>)(async (parseResult, cancellationToken) => 114private async Task<int> HandleCommandAsync(ParseResult parseResult, CancellationToken cancellationToken, CommonCommandServices services) 138var handlerTask = ExecuteAsync(parseResult, cancellationToken); 142var terminationTask = services.CancellationManager.ProcessTerminationCompletionSource.Task; 268protected abstract Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken);
Commands\BaseConfigSubCommand.cs (1)
15public abstract Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken);
Commands\CacheCommand.cs (1)
32protected override Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\CertificatesCleanCommand.cs (1)
25protected override Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\CertificatesTrustCommand.cs (1)
27protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\ConfigCommand.cs (16)
41protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 75protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 86public override async Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken) 92private async Task<int> ExecuteAsync(string key, CancellationToken cancellationToken) 132protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 151public override async Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken) 164private async Task<int> ExecuteAsync(string key, string value, bool isGlobal, CancellationToken cancellationToken) 212protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 218public override Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken) 223private async Task<int> ExecuteAsync(bool showAll, CancellationToken cancellationToken) 369protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 382public override async Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken) 402private async Task<int> ExecuteAsync(string key, bool isGlobal, CancellationToken cancellationToken) 452protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 458public override Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken) 463private Task<int> ExecuteAsync(bool useJson)
Commands\DashboardRunCommand.cs (6)
102protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 166private async Task<BundleLayoutLease?> EnsureDashboardBundleAsync(CancellationToken cancellationToken) 168var layoutTask = _bundleService.EnsureExtractedAndAcquireLayoutAsync("cli", "dashboard", cancellationToken); 392private async Task<CommandResult> ExecuteForegroundAsync(string managedPath, List<string> dashboardArgs, DashboardInfo dashboardInfo, IDictionary<string, string>? environmentVariables, CancellationToken cancellationToken) 434var processExitTask = process.WaitForExitAsync(cancellationToken); 435var readyOrFailed = Task.WhenAny(readyTcs.Task, processExitTask);
Commands\DcpWorkloadCleanupService.cs (1)
18public async Task<DcpWorkloadCleanupResult> CleanupAsync(string workloadId, CancellationToken cancellationToken)
Commands\DeployCommand.cs (1)
37protected override Task<string[]> GetRunArgumentsAsync(string? fullyQualifiedOutputPath, string[] unmatchedTokens, string? targetStep, ParseResult parseResult, CancellationToken cancellationToken)
Commands\DescribeCommand.cs (3)
124protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 153var dashboardUrlsTask = connection.GetDashboardUrlsAsync(cancellationToken); 232private async Task<int> ExecuteWatchAsync(ResourceSnapshotWatcher resourceWatcher, string? dashboardBaseUrl, string? resourceName, OutputFormat format, bool includeDisabledCommands, CancellationToken cancellationToken)
Commands\DestroyCommand.cs (1)
39protected override Task<string[]> GetRunArgumentsAsync(string? fullyQualifiedOutputPath, string[] unmatchedTokens, string? targetStep, ParseResult parseResult, CancellationToken cancellationToken)
Commands\DoCommand.cs (1)
66protected override async Task<string[]> GetRunArgumentsAsync(string? fullyQualifiedOutputPath, string[] unmatchedTokens, string? targetStep, ParseResult parseResult, CancellationToken cancellationToken)
Commands\DocsGetCommand.cs (1)
51protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\DocsListCommand.cs (1)
41protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\DocsSearchCommand.cs (1)
53protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\DoctorCommand.cs (2)
59protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 78var installationsTask = InstallationInfoOutput.DiscoverAllSafelyAsync(_installationDiscovery, _wingetFirstRunProbe, _logger, cancellationToken);
Commands\ExportCommand.cs (2)
72protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 134private async Task<int> ExportDataAsync(
Commands\ExtensionInternalCommand.cs (2)
21protected override Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 35protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\InitCommand.cs (6)
118protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 249private async Task<int> DropCSharpSkeletonAsync(DirectoryInfo workingDirectory, FileInfo? solutionFile, CancellationToken cancellationToken) 259private async Task<int> DropCSharpSingleFileSkeletonAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken) 350private async Task<int> DropCSharpProjectSkeletonAsync(FileInfo solutionFile, CancellationToken cancellationToken) 488private async Task<int> DropPolyglotSkeletonAsync(string languageId, DirectoryInfo workingDirectory, CancellationToken cancellationToken) 683private async Task<string?> ResolvePersistableChannelNameAsync(CancellationToken cancellationToken)
Commands\InstallationInfoOutput.cs (4)
16public static Task<IReadOnlyList<InstallationInfo>> DiscoverAllSafelyAsync( 23internal static async Task<IReadOnlyList<InstallationInfo>> DiscoverAllSafelyAsync( 36var discoveryTask = Task.Run( 58private static async Task<IReadOnlyList<InstallationInfo>> DiscoverAllCoreAsync(
Commands\IntegrationPackageSearchService.cs (6)
24public async Task<IEnumerable<(NuGetPackage Package, PackageChannel Channel)>> GetIntegrationPackagesWithChannelsAsync(DirectoryInfo workingDirectory, string? configuredChannel, CancellationToken cancellationToken) 55public async Task<(IReadOnlyList<(NuGetPackage Package, PackageChannel Channel)> Packages, IReadOnlySet<string> PolyglotCompatibleIds)> GetIntegrationPackagesWithPolyglotCompatibilityAsync(DirectoryInfo workingDirectory, string? configuredChannel, CancellationToken cancellationToken) 67var integrationPackagesTask = channel.GetIntegrationPackagesAsync(workingDirectory: workingDirectory, cancellationToken: ct); 68var polyglotIdsTask = channel.GetPolyglotCompatiblePackageIdsAsync(workingDirectory: workingDirectory, cancellationToken: ct); 81private async Task<IEnumerable<PackageChannel>> GetSearchChannelsAsync(string? configuredChannel, CancellationToken cancellationToken) 112public async Task<(DirectoryInfo WorkingDirectory, string? ConfiguredChannel, string? LanguageId, int? ExitCode)> GetPackageSearchContextAsync(FileInfo? passedAppHostProjectFile, CancellationToken cancellationToken)
Commands\IntegrationSearchCommand.cs (1)
50protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\LogsCommand.cs (4)
142protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 232private async Task<int> ExecuteGetAsync( 296private async Task<int> ExecuteWatchAsync( 374private static async Task<IList<LogEntry>> CollectLogsAsync(
Commands\LsCommand.cs (3)
71protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 145private async Task<List<AppHostProjectCandidate>> FindAppHostsWithJsonStreamAsync(AppHostDiscoveryScope scope, CancellationToken cancellationToken) 182private async Task<List<AppHostProjectCandidate>> FindAppHostsWithStatusAsync(AppHostDiscoveryScope scope, CancellationToken cancellationToken)
Commands\McpCallCommand.cs (1)
52protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\McpInitCommand.cs (1)
43protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\McpStartCommand.cs (1)
26protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\McpToolsCommand.cs (1)
40protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\NewCommand.cs (16)
163private async Task<string> PromptForAppHostLanguageAsync(IReadOnlyList<string> selectableLanguages, CancellationToken cancellationToken) 224private async Task<(bool Success, string? LanguageId)> ResolveSelectedLanguageAsync(ITemplate template, ParseResult parseResult, CancellationToken cancellationToken) 296private async Task<ITemplate?> GetProjectTemplateAsync(ITemplate[] availableTemplates, ParseResult parseResult, CancellationToken cancellationToken) 353private async Task<ResolveTemplateVersionResult> ResolveCliTemplateVersionAsync(ParseResult parseResult, string? source, CancellationToken cancellationToken) 493protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 635private async Task<string?> ResolveIdentityChannelNameAsync(CancellationToken cancellationToken) 661Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken); 662Task<string> PromptForProjectNameAsync(string defaultName, ParseResult parseResult, CancellationToken cancellationToken); 663Task<string> PromptForOutputPath(string v, ParseResult parseResult, Func<string, ValidationResult>? validator = null, Func<string, string>? outputPathResolver = null, CancellationToken cancellationToken = default); 674Task<(NuGetPackage Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(NuGetPackage Package, PackageChannel Channel)> candidatePackages, CancellationToken cancellationToken); 679public virtual async Task<(NuGetPackage Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(NuGetPackage Package, PackageChannel Channel)> candidatePackages, CancellationToken cancellationToken) 710async Task<(NuGetPackage Package, PackageChannel Channel)> PromptForChannelPackagesAsync( 733var rootChoices = new List<(string Label, Func<CancellationToken, Task<(NuGetPackage, PackageChannel)>> Action)>(); 776public virtual async Task<string> PromptForOutputPath(string path, ParseResult parseResult, Func<string, ValidationResult>? validator = null, Func<string, string>? outputPathResolver = null, CancellationToken cancellationToken = default) 796public virtual async Task<string> PromptForProjectNameAsync(string defaultName, ParseResult parseResult, CancellationToken cancellationToken) 807public virtual async Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken)
Commands\ParentCommand.cs (1)
18protected sealed override Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\PipelineCommandBase.cs (11)
124protected abstract Task<string[]> GetRunArgumentsAsync(string? fullyQualifiedOutputPath, string[] unmatchedTokens, string? targetStep, ParseResult parseResult, CancellationToken cancellationToken); 149protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 208Task<int>? pendingRun = null; 295var backchannel = await InteractionService.ShowStatusAsync(GetProgressMessage(parseResult), (Func<Task<IAppHostCliBackchannel>>)(async () => 716public async Task<bool> ProcessPublishingActivitiesDebugAsync(IAsyncEnumerable<PublishingActivity> publishingActivities, IAppHostCliBackchannel backchannel, CancellationToken cancellationToken) 810public async Task<bool> ProcessAndDisplayPublishingActivitiesAsync(IAsyncEnumerable<PublishingActivity> publishingActivities, IAppHostCliBackchannel backchannel, bool isDebugOrTraceLoggingEnabled, CancellationToken cancellationToken) 1122private async Task<string?> HandleSingleInputAsync(PublishingPromptInput input, string promptText, IAppHostCliBackchannel backchannel, string interactionId, CancellationToken cancellationToken) 1169private async Task<string?> HandleSelectInputAsync(PublishingPromptInput input, string promptText, CancellationToken cancellationToken) 1203private async Task<string?> HandleNumberInputAsync(PublishingPromptInput input, string promptText, CancellationToken cancellationToken) 1223private async Task<string?> HandleFileInputAsync(PublishingPromptInput input, string promptText, IAppHostCliBackchannel backchannel, string interactionId, CancellationToken cancellationToken) 1320private static async Task<string> UploadFilesAsync(List<string> filePaths, IAppHostCliBackchannel backchannel, string interactionId, string inputName, CancellationToken cancellationToken)
Commands\PsCommand.cs (5)
106protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 167private async Task<List<IAppHostAuxiliaryBackchannel>> ScanForConnectionsAsync(CancellationToken cancellationToken) 178private async Task<CommandResult> ExecuteFollowAsync(OutputFormat format, CancellationToken cancellationToken) 265async Task<bool> TryWriteAppHostInfoAsync(AppHostDisplayInfo appHost) 327private async Task<List<AppHostDisplayInfo>> GatherAppHostInfosAsync(List<IAppHostAuxiliaryBackchannel> connections, CancellationToken cancellationToken)
Commands\PublishCommand.cs (3)
19Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken); 24public virtual async Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken) 52protected override Task<string[]> GetRunArgumentsAsync(string? fullyQualifiedOutputPath, string[] unmatchedTokens, string? targetStep, ParseResult parseResult, CancellationToken cancellationToken)
Commands\RenderCommand.cs (12)
109protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 147private async Task<int> ExecuteChoiceAsync(string choice, int? consoleWidth, CancellationToken cancellationToken) 257private async Task<int> TestShowStatusAsync(CancellationToken cancellationToken) 274private async Task<int> TestShowStatusWithMarkupAsync(CancellationToken cancellationToken) 289private async Task<int> TestShowStatusEscapedAsync(CancellationToken cancellationToken) 303private async Task<int> TestChoiceWithFormatterAsync(CancellationToken cancellationToken) 324private async Task<int> TestChoiceSimpleAsync(CancellationToken cancellationToken) 393private async Task<int> TestBufferedLoggingAsync(CancellationToken cancellationToken) 442private async Task<int> TestLinksAsync(CancellationToken cancellationToken) 571private async Task<int> RenderDebugActivitiesAsync(CancellationToken cancellationToken) 581private async Task<int> RenderPipelineActivitiesAsync(CancellationToken cancellationToken) 823protected override Task<string[]> GetRunArgumentsAsync(string? fullyQualifiedOutputPath, string[] unmatchedTokens, string? targetStep, ParseResult parseResult, CancellationToken cancellationToken) => Task.FromResult(Array.Empty<string>());
Commands\ResourceCommand.cs (7)
116protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 184private static async Task<CommandResult> LoadCommandArgumentsAsync( 223private static async Task<ResourceSnapshotCommand?> GetCommandMetadataAsync(IAppHostAuxiliaryBackchannel connection, string resourceName, string commandName, bool includeHidden, CancellationToken cancellationToken) 234private static async Task<(string Name, string Description)[]> GetAvailableCommandMetadataAsync(IAppHostAuxiliaryBackchannel connection, string resourceName, bool includeHidden, CancellationToken cancellationToken) 597public override async Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken) 664private async Task<IAppHostAuxiliaryBackchannel?> ResolveConnectionForAvailableCommandsAsync(ParseResult parseResult, CancellationToken cancellationToken) 683private async Task<IAppHostAuxiliaryBackchannel?> ResolveExplicitConnectionForAvailableCommandsAsync(FileInfo appHostProjectFile, CancellationToken cancellationToken)
Commands\ResourceCommandHelper.cs (2)
31public static async Task<int> ExecuteResourceCommandAsync( 63public static async Task<int> ExecuteGenericCommandAsync(
Commands\RestoreCommand.cs (1)
60protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\RootCommand.cs (1)
203this.SetAction((Func<ParseResult, CancellationToken, Task<int>>)((context, cancellationToken) =>
Commands\RunCommand.cs (21)
169protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 253Task<int>? runTask = null; 824private static async Task<int?> ObserveEarlyDetachedStartupExitAsync(Task<int> pendingRun, CancellationToken cancellationToken) 840private static async Task<AppHostExitResolution> ResolveAppHostExitCodeAsync(Task<int> appHostFailureTask, CancellationToken cancellationToken) 876private static async Task<int> GetAppHostStartupExitCodeAsync(Task<int> pendingRun) 888private async Task<AppHostStartupResult> WaitForAppHostStartupAsync( 889Task<int> pendingRun, 900var happyPathTask = RunStartupHappyPathAsync(backchannelCompletionSource, onBackchannelEstablished, logCaptureCancellationSource, pendingRun, startupStartTimestamp, startupTimeout, startupCts.Token); 977private async Task<AppHostStartupResult> RunStartupHappyPathAsync( 981Task<int> pendingRun, 1075private static async Task<bool> RequestAppHostStopForProfileAsync( 1077Task<int> pendingRun, 1221var structuredLogSupportProbe = ExtensionHelper.IsExtensionHost(interactionService, out var extensionInteractionService, out var extensionBackchannel) 1235Task<bool>? moveNextTask = null; 1398private static async Task<bool> SupportsStructuredAppHostLogsAsync( 1476private Task<CommandResult> ExecuteDetachedAsync(ParseResult parseResult, FileInfo? passedAppHostProjectFile, bool isExtensionHost, int timeoutSeconds, CancellationToken cancellationToken) 1529Task<int> pendingRun, 1559private async Task DrainAppHostRunAfterCancellationAsync(Task<int> pendingRun)
Commands\Sdk\SdkDumpCommand.cs (5)
75protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 164private Task<IAppHostServerProject> CreateCapabilityScannerProjectAsync(string tempDir, CancellationToken cancellationToken) 170private async Task<int> DumpCapabilitiesAsync( 269private async Task<int> DumpCapabilitiesToDirectoryAsync( 348private async Task<IntegrationDumpResult> DumpIntegrationCapabilitiesAsync(
Commands\Sdk\SdkExportCommand.cs (3)
63protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 159private async Task<LanguageInfo?> FindLanguageAsync(string language, CancellationToken cancellationToken) 175private async Task<int> ExportApiAsync(
Commands\Sdk\SdkGenerateCommand.cs (3)
59protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 95private async Task<LanguageInfo?> GetLanguageInfoAsync(string language, CancellationToken cancellationToken) 105private async Task<int> GenerateSdkAsync(
Commands\SecretDeleteCommand.cs (1)
35protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SecretGetCommand.cs (1)
36protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SecretListCommand.cs (1)
38protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SecretPathCommand.cs (1)
28protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SecretSetCommand.cs (1)
40protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SetupCommand.cs (1)
42protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\StartCommand.cs (1)
48protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\StopCommand.cs (11)
85protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 123private async Task<int> ForceStopAppHostAsync(FileInfo? passedAppHostProjectFile, CancellationToken cancellationToken) 150private async Task<FileInfo?> TryResolveAppHostFileAsync( 190private async Task<int> ExecuteNonInteractiveAsync(FileInfo? passedAppHostProjectFile, CancellationToken cancellationToken) 196private async Task<StopAppHostResult> ExecuteNonInteractiveWithResultAsync(FileInfo? passedAppHostProjectFile, CancellationToken cancellationToken, bool treatNotRunningAsSuccess = false) 255private async Task<int> ExecuteInteractiveAsync(FileInfo? passedAppHostProjectFile, CancellationToken cancellationToken) 261private async Task<StopAppHostResult> ExecuteInteractiveWithResultAsync(FileInfo? passedAppHostProjectFile, CancellationToken cancellationToken) 293private async Task<StopAppHostResult> StopRunningAppHostsForResolvedFileAsync(FileInfo appHostFile, AppHostConnectionResult[] allConnections, CancellationToken cancellationToken) 336private async Task<int> CleanupPersistentResourcesAsync(FileInfo appHostFile, CancellationToken cancellationToken) 429private async Task<int> StopAllAppHostsAsync(CancellationToken cancellationToken) 483private async Task<int> StopAppHostAsync(IAppHostAuxiliaryBackchannel connection, string appHostIdentifier, CancellationToken cancellationToken)
Commands\TelemetryCommandHelpers.cs (6)
190public static async Task<DashboardApiResult> GetDashboardApiAsync( 341public static async Task<TelemetryErrorInfo> FormatTelemetryErrorAsync( 360public static async Task<TelemetryErrorInfo> GetDashboardApiErrorAsync( 414public static async Task<string> GetDashboardApiErrorMessageAsync( 432internal static async Task<TokenExchangeResult> ExchangeLoginTokenForApiKeyAsync( 505public static async Task<ResourceInfoJson[]> GetAllResourcesAsync(HttpClient client, string baseUrl, CancellationToken cancellationToken)
Commands\TelemetryLogsCommand.cs (4)
79protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 111private async Task<int> FetchLogsAsync( 166private async Task<int> GetLogsSnapshotAsync(HttpClient client, string url, OutputFormat format, IReadOnlyList<IOtlpResource> allResources, string dashboardUrl, CancellationToken cancellationToken) 188private async Task<int> StreamLogsAsync(HttpClient client, string url, OutputFormat format, IReadOnlyList<IOtlpResource> allResources, string dashboardUrl, CancellationToken cancellationToken)
Commands\TelemetrySpansCommand.cs (4)
69protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 101private async Task<int> FetchSpansAsync( 158private async Task<int> GetSpansSnapshotAsync(HttpClient client, string url, OutputFormat format, IReadOnlyList<IOtlpResource> allResources, string dashboardUrl, CancellationToken cancellationToken) 180private async Task<int> StreamSpansAsync(HttpClient client, string url, OutputFormat format, IReadOnlyList<IOtlpResource> allResources, string dashboardUrl, CancellationToken cancellationToken)
Commands\TelemetryTracesCommand.cs (3)
68protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 116private async Task<int> FetchSingleTraceAsync( 174private async Task<int> FetchTracesAsync(
Commands\TemplateCommand.cs (3)
11private readonly Func<ParseResult, CancellationToken, Task<CommandResult>> _executeCallback; 15public TemplateCommand(ITemplate template, Func<ParseResult, CancellationToken, Task<CommandResult>> executeCallback, CommonCommandServices services) 39protected override Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\TerminalAttachCommand.cs (2)
75protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 210private async Task<(TerminalReplicaInfo? Replica, int ErrorExitCode)> SelectReplicaAsync(
Commands\TerminalCommand.cs (1)
31protected override Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\TerminalPsCommand.cs (1)
71protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\UpdateCommand.cs (5)
152protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 556private async Task<CommandResult?> TryUpdateCliBeforeGuestProjectUpdateAsync( 617private async Task<SemVersion?> GetLatestGuestSdkVersionAsync(PackageChannel channel, DirectoryInfo projectDirectory, CancellationToken cancellationToken) 643private async Task<CommandResult> ExecuteSelfUpdateAsync(ParseResult parseResult, string? selectedChannel, CancellationToken cancellationToken) 915private async Task<string?> GetNewVersionAsync(string exePath, CancellationToken cancellationToken)
Commands\WaitCommand.cs (3)
61protected override async Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 100private async Task<int> WaitForResourceAsync( 115(Func<Task<int>>)(async () =>
Configuration\ConfigurationService.cs (6)
52public async Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 159public async Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 170public async Task<Dictionary<string, string>> GetLocalConfigurationAsync(CancellationToken cancellationToken = default) 178public async Task<Dictionary<string, string>> GetGlobalConfigurationAsync(CancellationToken cancellationToken = default) 359public Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default) 366public Task<string?> GetConfigurationFromDirectoryAsync(string key, DirectoryInfo startDirectory, bool continueSearchWhenKeyMissing = false, CancellationToken cancellationToken = default)
Configuration\IConfigurationService.cs (6)
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); 31Task<string?> GetConfigurationFromDirectoryAsync(string key, DirectoryInfo startDirectory, bool continueSearchWhenKeyMissing = false, CancellationToken cancellationToken = default);
Documentation\ApiDocs\ApiDocsCache.cs (7)
41public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) 59public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) 84public Task<ApiReferenceItem[]?> GetIndexAsync(CancellationToken cancellationToken = default) 100public Task<string?> GetIndexSourceFingerprintAsync(CancellationToken cancellationToken = default) 116public Task<ApiReferenceItem[]?> GetMemberIndexAsync(CancellationToken cancellationToken = default) 132public Task<string?> GetMemberIndexSourceFingerprintAsync(CancellationToken cancellationToken = default) 148public async Task<string[]?> GetIndexedMemberContainerIdsAsync(CancellationToken cancellationToken = default)
Documentation\ApiDocs\ApiDocsFetcher.cs (4)
17Task<string?> FetchSitemapAsync(CancellationToken cancellationToken = default); 22Task<string?> FetchPageAsync(string pageUrl, CancellationToken cancellationToken = default); 41public Task<string?> FetchSitemapAsync(CancellationToken cancellationToken = default) 50public Task<string?> FetchPageAsync(string pageUrl, CancellationToken cancellationToken = default)
Documentation\ApiDocs\IApiDocsCache.cs (5)
14Task<ApiReferenceItem[]?> GetIndexAsync(CancellationToken cancellationToken = default); 24Task<string?> GetIndexSourceFingerprintAsync(CancellationToken cancellationToken = default); 34Task<ApiReferenceItem[]?> GetMemberIndexAsync(CancellationToken cancellationToken = default); 44Task<string?> GetMemberIndexSourceFingerprintAsync(CancellationToken cancellationToken = default); 54Task<string[]?> GetIndexedMemberContainerIdsAsync(CancellationToken cancellationToken = default);
Documentation\CachedHttpDocumentFetcher.cs (2)
25public static async Task<string?> FetchAsync( 109public static Task<string?> FetchAsync(
Documentation\Docs\DocsCache.cs (4)
41public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) 47public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) 56public async Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default) 89public async Task<string?> GetIndexSourceFingerprintAsync(CancellationToken cancellationToken = default)
Documentation\Docs\DocsFetcher.cs (2)
20Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default); 34public async Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default)
Documentation\Docs\DocsSearchService.cs (2)
22Task<DocsSearchResponse?> SearchAsync(string query, int topK = 5, CancellationToken cancellationToken = default); 133public async Task<DocsSearchResponse?> SearchAsync(string query, int topK = 5, CancellationToken cancellationToken = default)
Documentation\Docs\IDocsCache.cs (2)
16Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default); 30Task<string?> GetIndexSourceFingerprintAsync(CancellationToken cancellationToken = default);
Documentation\Docs\LlmsTxtParser.cs (1)
126public static Task<IReadOnlyList<LlmsDocument>> ParseAsync(string content, CancellationToken cancellationToken = default)
Documentation\FileBackedDocumentContentCache.cs (4)
30public async Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) 74public async Task<string?> GetETagAsync(string key, CancellationToken cancellationToken = default) 161public async Task<T?> GetJsonAsync<T>( 272private async Task<string?> ReadTextFileAsync(string filePath, CancellationToken cancellationToken)
Documentation\IDocumentContentCache.cs (2)
17Task<string?> GetAsync(string key, CancellationToken cancellationToken = default); 33Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default);
DotNet\DotNetCliRunner.cs (34)
33Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken); 34Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, string[] targets, ProcessInvocationOptions options, CancellationToken cancellationToken); 35Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, ProcessInvocationOptions options, CancellationToken cancellationToken); 36Task<int> RunAppHostCommandAsync(FileInfo projectFile, string command, DirectoryInfo workingDirectory, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, ProcessInvocationOptions options, CancellationToken cancellationToken); 37Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, ProcessInvocationOptions options, CancellationToken cancellationToken); 38Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, ProcessInvocationOptions options, CancellationToken cancellationToken); 39Task<int> RestoreAsync(FileInfo projectFilePath, ProcessInvocationOptions options, CancellationToken cancellationToken); 40Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, ProcessInvocationOptions options, CancellationToken cancellationToken); 41Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, IDictionary<string, string>? env, ProcessInvocationOptions options, CancellationToken cancellationToken); 42Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, bool noRestore, ProcessInvocationOptions options, CancellationToken cancellationToken); 43Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken); 44Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool exactMatch, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, ProcessInvocationOptions options, CancellationToken cancellationToken); 45Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, ProcessInvocationOptions options, CancellationToken cancellationToken); 46Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, ProcessInvocationOptions options, CancellationToken cancellationToken); 47Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProject, ProcessInvocationOptions options, CancellationToken cancellationToken); 48Task<int> InitUserSecretsAsync(FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken); 202private async Task<int> ExecuteAsync( 695public async Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 785public async Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, string[] targets, ProcessInvocationOptions options, CancellationToken cancellationToken) 909public async Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, ProcessInvocationOptions options, CancellationToken cancellationToken) 967public async Task<int> RunAppHostCommandAsync( 1040public async Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, ProcessInvocationOptions options, CancellationToken cancellationToken) 1251public async Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, ProcessInvocationOptions options, CancellationToken cancellationToken) 1266public async Task<int> RestoreAsync(FileInfo projectFilePath, ProcessInvocationOptions options, CancellationToken cancellationToken) 1282public Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, ProcessInvocationOptions options, CancellationToken cancellationToken) 1285public async Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, IDictionary<string, string>? env, ProcessInvocationOptions options, CancellationToken cancellationToken) 1307public async Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, bool noRestore, ProcessInvocationOptions options, CancellationToken cancellationToken) 1371public async Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 1400public async Task<string> ComputeNuGetConfigHierarchySha256Async(DirectoryInfo workingDirectory, ProcessInvocationOptions options, CancellationToken cancellationToken) 1463public async Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool exactMatch, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, ProcessInvocationOptions options, CancellationToken cancellationToken) 1644public async Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, ProcessInvocationOptions options, CancellationToken cancellationToken) 1686public async Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 1754public async Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProject, ProcessInvocationOptions options, CancellationToken cancellationToken) 1783public Task<int> InitUserSecretsAsync(FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken)
DotNet\DotNetSdkInstaller.cs (3)
30public async Task<(bool Success, string? HighestDetectedVersion, string MinimumRequiredVersion)> CheckAsync(CancellationToken cancellationToken = default) 44var standardOutputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 45var standardErrorTask = process.StandardError.ReadToEndAsync(cancellationToken);
DotNet\IDotNetSdkInstaller.cs (1)
16Task<(bool Success, string? HighestDetectedVersion, string MinimumRequiredVersion)> CheckAsync(CancellationToken cancellationToken = default);
DotNet\IProcessExecution.cs (2)
34Task<bool> StartAsync(CancellationToken cancellationToken); 51Task<int> WaitForExitAsync(CancellationToken cancellationToken);
DotNet\ProcessExecution.cs (3)
93public async Task<bool> StartAsync(CancellationToken cancellationToken) 151private async Task<IDisposable?> ResolveDetachedUnixLauncherAsync(CancellationToken cancellationToken) 201public async Task<int> WaitForExitAsync(CancellationToken cancellationToken)
Git\GitRepository.cs (6)
20public async Task<DirectoryInfo?> GetRootAsync(CancellationToken cancellationToken) 46var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 47var errorTask = process.StandardError.ReadToEndAsync(cancellationToken); 91public async Task<IReadOnlySet<string>?> GetIncludedFilesAsync(DirectoryInfo searchRoot, CancellationToken cancellationToken) 132var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 133var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Git\IGitRepository.cs (2)
16Task<DirectoryInfo?> GetRootAsync(CancellationToken cancellationToken); 38Task<IReadOnlySet<string>?> GetIncludedFilesAsync(DirectoryInfo searchRoot, CancellationToken cancellationToken);
Interaction\ConsoleInteractionService.cs (10)
105public async Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) 144public async Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) 218public async Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 281public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 286public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 350public async Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 665public async Task<bool> PromptConfirmAsync(string promptText, PromptBinding<bool>? binding = null, CancellationToken cancellationToken = default) 710private async Task<bool> PromptConfirmWithSingleKeyAsync(string promptText, char yesChoice, char noChoice, bool defaultValue, CancellationToken cancellationToken)
Interaction\ExtensionInteractionService.cs (12)
20Task<bool> TryDisplayCommandFailureAsync(string? errorMessage, string cliLogFilePath, string? appHostCliLogFilePath, CancellationToken cancellationToken); 87public async Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) 104public async Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) 145public async Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 202public async Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 271public async Task<bool> PromptConfirmAsync(string promptText, PromptBinding<bool>? binding = null, CancellationToken cancellationToken = default) 308public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 346public async Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 452public async Task<bool> SupportsMessageActionsAsync(CancellationToken cancellationToken) 474public async Task<bool> TryDisplayCommandFailureAsync(
Interaction\IInteractionService.cs (10)
13Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false); 21/// Use this instead of <see cref="ShowStatusAsync{T}(string, Func{Task{T}}, KnownEmoji?, bool)"/> when the 24Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null); 25Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default); 26Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default); 27public Task<bool> PromptConfirmAsync(string promptText, PromptBinding<bool>? binding = null, CancellationToken cancellationToken = default); 28Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull; 29Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull;
Layout\LayoutProcessRunner.cs (2)
16public async Task<(int ExitCode, string Output, string Error)> RunAsync( 64public async Task<IProcessExecution> StartAsync(
Mcp\IMcpResourceToolRefreshService.cs (1)
31Task<(IReadOnlyDictionary<string, ResourceToolEntry> ToolMap, bool Changed)> RefreshResourceToolMapAsync(CancellationToken cancellationToken);
Mcp\McpResourceToolRefreshService.cs (1)
75public async Task<(IReadOnlyDictionary<string, ResourceToolEntry> ToolMap, bool Changed)> RefreshResourceToolMapAsync(CancellationToken cancellationToken)
Mcp\Tools\IDashboardInfoProvider.cs (3)
23Task<(string apiToken, string apiBaseUrl, string? dashboardBaseUrl)> GetDashboardInfoAsync(CancellationToken cancellationToken); 35public Task<(string apiToken, string apiBaseUrl, string? dashboardBaseUrl)> GetDashboardInfoAsync(CancellationToken cancellationToken) 48public Task<(string apiToken, string apiBaseUrl, string? dashboardBaseUrl)> GetDashboardInfoAsync(CancellationToken cancellationToken)
Mcp\Tools\ListResourcesTool.cs (2)
73var dashboardUrlsTask = connection.GetDashboardUrlsAsync(cancellationToken); 74var snapshotsTask = connection.GetResourceSnapshotsAsync(includeHidden: true, cancellationToken);
Mcp\Tools\McpToolHelpers.cs (5)
18public static async Task<(string apiToken, string apiBaseUrl, string? dashboardBaseUrl)> GetDashboardInfoAsync(IAuxiliaryBackchannelMonitor auxiliaryBackchannelMonitor, ILogger logger, CancellationToken cancellationToken) 154internal static async Task<CallToolResult?> CheckResourceExcludedAsync( 167internal static async Task<CallToolResult?> CheckResourceExcludedAsync( 193internal static async Task<HashSet<string>> GetExcludedResourceNamesAsync( 209internal static async Task<HashSet<string>> GetExcludedResourceNamesAsync(
Migrations\IMigration.cs (1)
58Task<MigrationDescriptor?> DetectAsync(MigrationContext context, CancellationToken cancellationToken);
Migrations\TypeScriptAppHostMigration.cs (2)
63public async Task<MigrationDescriptor?> DetectAsync(MigrationContext context, CancellationToken cancellationToken) 129private async Task<FileInfo?> ResolveLegacyAppHostAsync(MigrationContext context, CancellationToken cancellationToken)
Npm\INpmProvenanceChecker.cs (1)
203Task<ProvenanceVerificationResult> VerifyProvenanceAsync(string packageName, string version, string expectedSourceRepository, string expectedWorkflowPath, string expectedBuildType, Func<WorkflowRefInfo, bool>? validateWorkflowRef, string? sriIntegrity, CancellationToken cancellationToken);
Npm\INpmRunner.cs (3)
46Task<NpmPackageInfo?> ResolvePackageAsync(string packageName, string versionRange, CancellationToken cancellationToken); 56Task<string?> PackAsync(string packageName, string version, string outputDirectory, CancellationToken cancellationToken); 64Task<bool> InstallGlobalAsync(string tarballPath, CancellationToken cancellationToken);
Npm\NpmRunner.cs (6)
34public async Task<NpmPackageInfo?> ResolvePackageAsync(string packageName, string versionRange, CancellationToken cancellationToken) 89public async Task<string?> PackAsync(string packageName, string version, string outputDirectory, CancellationToken cancellationToken) 132public async Task<bool> InstallGlobalAsync(string tarballPath, CancellationToken cancellationToken) 284private async Task<string?> RunNpmCommandInDirectoryAsync(string npmPath, string[] args, string workingDirectory, CancellationToken cancellationToken) 309var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 310var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Npm\SigstoreNpmProvenanceChecker.cs (5)
14internal delegate Task<(bool Success, VerificationResult? Result)> SigstoreBundleVerificationHandler( 60public async Task<ProvenanceVerificationResult> VerifyProvenanceAsync( 149private async Task<string?> FetchAttestationJsonAsync( 244private async Task<(ProvenanceVerificationResult? Failure, VerificationResult? Result)> VerifySigstoreBundleAsync( 295private static async Task<(bool Success, VerificationResult? Result)> VerifyBundleWithPolicyAsync(
NuGet\BundleNuGetPackageCache.cs (6)
40public async Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync( 57public async Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync( 74public async Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync( 91public async Task<IEnumerable<NuGetPackage>> GetPackagesAsync( 111public async Task<IEnumerable<NuGetPackage>> GetPackageVersionsAsync( 131private async Task<IEnumerable<NuGetPackage>> SearchPackagesInternalAsync(
NuGet\BundleNuGetService.cs (2)
32Task<string> RestorePackagesAsync( 70public async Task<string> RestorePackagesAsync(
NuGet\NuGetPackageCache.cs (11)
17Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 18Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 19Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 20Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken); 21Task<IEnumerable<NuGetPackage>> GetPackageVersionsAsync(DirectoryInfo workingDirectory, string exactPackageId, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken); 74public async Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 89public async Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 94public async Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 110private static async Task<string> ComputeNuGetConfigHashSuffixAsync(FileInfo nugetConfigFile, CancellationToken cancellationToken) 118public async Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string query, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 189public async Task<IEnumerable<NuGetPackage>> GetPackageVersionsAsync(DirectoryInfo workingDirectory, string exactPackageId, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
NuGet\NuGetPackagePrefetcher.cs (1)
107private 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 (5)
33public static async Task CreateOrUpdateAsync(DirectoryInfo targetDirectory, PackageChannel channel, Func<FileInfo, XmlDocument?, XmlDocument, CancellationToken, Task<bool>>? confirmationCallback = null, CancellationToken cancellationToken = default) 55Func<FileInfo, XmlDocument?, XmlDocument, CancellationToken, Task<bool>>? confirmationCallback = null, 81private static async Task CreateNewNuGetConfigAsync(DirectoryInfo targetDirectory, PackageMapping[] mappings, bool configureGlobalPackagesFolder, Func<FileInfo, XmlDocument?, XmlDocument, CancellationToken, Task<bool>>? confirmationCallback, CancellationToken cancellationToken) 115private static async Task UpdateExistingNuGetConfigAsync(FileInfo nugetConfigFile, PackageMapping[] mappings, bool configureGlobalPackagesFolder, Func<FileInfo, XmlDocument?, XmlDocument, CancellationToken, Task<bool>>? confirmationCallback, CancellationToken cancellationToken) 166private static async Task<NuGetConfigContext> LoadAndValidateConfigAsync(FileInfo nugetConfigFile, PackageMapping[] mappings)
Packaging\PackageChannel.cs (13)
129public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken) 137public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, PackageMapping[]? mappings, CancellationToken cancellationToken) 146public async Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync( 169var tasks = new List<Task<IEnumerable<NuGetPackage>>>(); 207public async Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken) 218var tasks = new List<Task<IEnumerable<NuGetPackage>>>(); 377public async Task<IReadOnlySet<string>> GetPolyglotCompatiblePackageIdsAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken) 389var tasks = new List<Task<IEnumerable<NuGetPackage>>>(); 490public async Task<IEnumerable<NuGetPackage>> GetPackagesAsync(string packageId, DirectoryInfo workingDirectory, CancellationToken cancellationToken) 497var tasks = new List<Task<IEnumerable<NuGetPackage>>>(); 561public async Task<NuGetPackage?> GetLatestGuestAppHostSdkPackageAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken) 586public async Task<IEnumerable<NuGetPackage>> GetPackageVersionsAsync(string packageId, DirectoryInfo workingDirectory, CancellationToken cancellationToken) 588var tasks = new List<Task<IEnumerable<NuGetPackage>>>();
Packaging\PackagingService.cs (2)
22public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default, string? requestedChannelName = null); 132public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default, string? requestedChannelName = null)
Packaging\TemporaryNuGetConfig.cs (1)
21public static async Task<TemporaryNuGetConfig> CreateAsync(PackageMapping[] mappings, bool configureGlobalPackagesFolder = false, string? globalPackagesFolderValue = null)
Processes\DcpExecutableResolver.cs (1)
18public static async Task<DcpExecutableResolution?> TryGetDcpExecutableAsync(
Processes\IAppHostStopper.cs (3)
16Task<bool> StopProcessTreeAsync( 22Task<bool> StopAppHostAsync( 24Func<CancellationToken, Task<bool>>? requestRpcStopAsync,
Processes\IProcessTreeGracefulShutdownSignaler.cs (1)
22Task<bool> RequestProcessTreeGracefulShutdownAsync(
Processes\IsolatedProcess.cs (2)
294public static async Task<IsolatedProcess> StartAsync( 308public async Task<bool> StartAsync(CancellationToken cancellationToken)
Processes\IsolatedProcess.Unix.cs (4)
11private static async Task<StartedProcess> StartDetachedUnixAsync( 50var stderrTask = dcpProcess.StandardError.ReadToEndAsync(CancellationToken.None); 51var stdoutLineTask = dcpProcess.StandardOutput.ReadLineAsync(CancellationToken.None).AsTask(); 127private static void ObserveDcpForkProcessStderr(Task<string> stderrTask)
Processes\ProcessTreeGracefulShutdownService.cs (18)
30public Task<bool> StopProcessTreeAsync( 43public async Task<bool> StopAppHostAsync( 45Func<CancellationToken, Task<bool>>? requestRpcStopAsync, 75internal async Task<bool> StopProcessesAsync( 77Func<CancellationToken, Task<bool>> requestGracefulShutdownAsync, 87private async Task<bool> StopProcessesAsync( 90Func<CancellationToken, Task<bool>> requestGracefulShutdownAsync, 134private async Task<bool> RequestAppHostGracefulShutdownAsync( 136Func<CancellationToken, Task<bool>>? requestRpcStopAsync, 182private async Task<bool> TryRequestGracefulShutdownAsync( 183Func<CancellationToken, Task<bool>> requestGracefulShutdownAsync, 197private async Task<bool> TryRequestRpcStopAsync(Func<CancellationToken, Task<bool>> requestRpcStopAsync, CancellationToken cancellationToken) 219public async Task<bool> RequestProcessTreeGracefulShutdownAsync( 231private async Task<bool> RequestProcessTreeGracefulShutdownAsync( 259internal async Task<bool> TryStopProcessTreeWithDcpAsync(int pid, DateTimeOffset? startTime, bool includeStartTime, CancellationToken cancellationToken) 267private async Task<bool> TryStopProcessTreeWithDcpAsync(ProcessTarget target, bool includeStartTime, CancellationToken cancellationToken) 330private async Task<bool> MonitorProcessesForTerminationAsync(IReadOnlyCollection<ProcessTarget> processes, CancellationToken cancellationToken)
Profiling\ProfileCaptureService.cs (7)
51public async Task<ProfileCaptureSession> StartAsync(ProfileCaptureOptions options, CancellationToken cancellationToken) 54internal async Task<ProfileCaptureSession> StartAsync( 226private readonly Task<int> _dashboardExitTask; 319public async Task<int> ExportAsync(CancellationToken cancellationToken) 388private async Task<TelemetryApiResponse?> WaitForProfileDataAsync(CancellationToken cancellationToken) 445private async Task<TelemetryApiResponse?> GetTracesAsync(CancellationToken cancellationToken) 493private async Task<int> GetDashboardExitCodeAsync()
Program.cs (2)
285internal static async Task<IHost> BuildApplicationAsync(string[] args, CliStartupContext startupContext, Dictionary<string, string?>? configurationValues = null) 997public static async Task<int> Main(string[] args)
Projects\AppHostCandidateFinder.cs (2)
34Task<AppHostCandidateFileSearchResult> FindCandidateFilesAsync( 100public async Task<AppHostCandidateFileSearchResult> FindCandidateFilesAsync(
Projects\AppHostInfoResolver.cs (7)
14Task<AppHostProjectInfo> GetAppHostInfoAsync(FileInfo projectFile, CancellationToken cancellationToken); 19private readonly ConcurrentDictionary<(string Path, DateTime LastWriteUtc), Task<AppHostProjectInfo>> _cache = new(); 21public async Task<AppHostProjectInfo> GetAppHostInfoAsync(FileInfo projectFile, CancellationToken cancellationToken) 26var task = GetOrAddSharedFetch(key, projectFile); 54private Task<AppHostProjectInfo> GetOrAddSharedFetch((string Path, DateTime LastWriteUtc) key, FileInfo projectFile) 58if (_cache.TryGetValue(key, out var existingTask)) 91private async Task<AppHostProjectInfo> FetchAppHostInfoCoreAsync(FileInfo projectFile, CancellationToken cancellationToken)
Projects\AppHostRpcClient.cs (12)
38public static async Task<AppHostRpcClient> ConnectAsync( 82public Task<RuntimeSpec> GetRuntimeSpecAsync(string languageId, CancellationToken cancellationToken) 86public Task<Dictionary<string, string>> ScaffoldAppHostAsync( 98public Task<Dictionary<string, string>> GenerateCodeAsync(string languageId, CancellationToken cancellationToken) 102public Task<Dictionary<string, string>> GenerateCodeForAssemblyAsync(string languageId, string assemblyName, CancellationToken cancellationToken) 106public Task<Commands.Sdk.CapabilitiesInfo> GetCapabilitiesAsync(CancellationToken cancellationToken) 110public Task<Commands.Sdk.CapabilitiesInfo> GetCapabilitiesForAssembliesAsync(IReadOnlyList<string> assemblyNames, CancellationToken cancellationToken) 114public Task<JsonElement> ExportApiAsync(string languageId, string packageName, string packageVersion, CancellationToken cancellationToken) 118public Task<T> InvokeAsync<T>(string methodName, object?[] parameters, CancellationToken cancellationToken) 130private async Task<T> InvokeCodeGenerationAsync<T>(string methodName, object?[] parameters, CancellationToken cancellationToken) 186private static async Task<Stream> ConnectToServerAsync(string socketPath, IEnvironment environment, CancellationToken cancellationToken) 258public async Task<IAppHostRpcClient> ConnectAsync(string socketPath, string authenticationToken, CancellationToken cancellationToken)
Projects\AppHostServerClosureSnapshots.cs (1)
402public async Task<AppHostServerProjectLayout?> GetOrCreateAsync(
Projects\AppHostServerProject.cs (4)
19Task<IAppHostServerProject> CreateAsync(string appPath, CancellationToken cancellationToken = default); 20Task<IAppHostServerProject> CreateAsync(string appPath, string? restoreRootConfigDirectory, CancellationToken cancellationToken); 38public Task<IAppHostServerProject> CreateAsync(string appPath, CancellationToken cancellationToken = default) 41public async Task<IAppHostServerProject> CreateAsync(string appPath, string? restoreRootConfigDirectory, CancellationToken cancellationToken)
Projects\AppHostServerSession.cs (4)
259public Task<int> WaitForExitAsync() 292public async Task<IAppHostRpcClient> GetRpcClientAsync(CancellationToken cancellationToken) 304var serverExitTask = (_completion ?? throw new SessionNotStartedException()).Task; 313var connectTask = AppHostRpcClient.ConnectAsync(socketPath, _authenticationToken, _environment, _profilingTelemetry, connectCts.Token);
Projects\DefaultLanguageDiscovery.cs (4)
84public Task<IEnumerable<LanguageInfo>> GetAvailableLanguagesAsync(CancellationToken cancellationToken = default) 90public Task<string?> GetPackageForLanguageAsync(LanguageId languageId, CancellationToken cancellationToken = default) 99public Task<LanguageId?> DetectLanguageAsync(DirectoryInfo directory, CancellationToken cancellationToken = default) 120public Task<LanguageId?> DetectLanguageRecursiveAsync(DirectoryInfo directory, CancellationToken cancellationToken = default)
Projects\DotNetAppHostProject.cs (17)
139public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken = default) 1375public async Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 1427public async Task<string?> GetAspireHostingVersionAsync(FileInfo appHostFile, CancellationToken cancellationToken) 1439public async Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) 1678private async Task<(int? ExitCode, bool BuiltByCli, bool DeferBuildCompletion)> PrepareAppHostAsync( 1723private async Task<(int? ExitCode, bool BuiltByCli, bool DeferBuildCompletion)> BuildAppHostIfNeededAsync( 1775private async Task<(bool IsCompatibleAppHost, string? AspireHostingVersion)> CheckAppHostCompatibilityAsync( 1813private async Task<DirectAppHostRunSpec?> TryCreateDirectRunSpecAsync( 1876private async Task<bool> IsDirectLaunchDisabledAsync(FileInfo effectiveAppHostFile, CancellationToken cancellationToken) 2376public async Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) 2483public async Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) 2506public async Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) 2513public async Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 2537public async Task<string?> GetUserSecretsIdAsync(FileInfo projectFile, bool autoInit, CancellationToken cancellationToken) 2565private async Task<string?> QueryUserSecretsIdAsync(FileInfo projectFile, CancellationToken cancellationToken) 2582private Task<BundleLayoutLease?> AcquireCliBundleLayoutAsync(CancellationToken cancellationToken) 2700private async Task<string?> ConfigureIsolatedModeAsync(
Projects\DotNetBasedAppHostServerProject.cs (4)
275public async Task<(string ProjectPath, string? ChannelName)> CreateProjectFilesAsync( 554public async Task<(bool Success, OutputCollector Output)> BuildAsync(CancellationToken cancellationToken = default) 571public async Task<AppHostServerPrepareResult> PrepareAsync( 601public async Task<AppHostServerRunResult> RunAsync(
Projects\ExtensionGuestLauncher.cs (1)
31public async Task<(int ExitCode, OutputCollector? Output)> LaunchAsync(
Projects\GeneratedFileWriter.cs (1)
29public static async Task<bool> WriteIfChangedAsync(string path, string content, CancellationToken cancellationToken)
Projects\GuestAppHostProject.cs (20)
154public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken = default) 199private async Task<List<IntegrationReference>> GetIntegrationReferencesAsync( 261public Task<string?> GetAspireHostingVersionAsync(FileInfo appHostFile, CancellationToken cancellationToken) 278private static async Task<(bool Success, OutputCollector? Output, string? ChannelName, bool NeedsCodeGen)> PrepareAppHostServerAsync( 294internal async Task<bool> BuildAndGenerateSdkAsync(DirectoryInfo directory, string? packageSourceOverride = null, CancellationToken cancellationToken = default) 300private async Task<bool> BuildAndGenerateSdkAsync(DirectoryInfo directory, AspireConfigFile config, string? packageSourceOverride = null, CancellationToken cancellationToken = default) 353Task<bool> IGuestAppHostSdkGenerator.BuildAndGenerateSdkAsync(DirectoryInfo directory, string? packageSourceOverride, CancellationToken cancellationToken) 363public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 393public async Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) 500Task<int> serverCompletion; 1067public async Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) 1127Task<int> serverCompletion; 1436public async Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) 1462public async Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) 1607public async Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 1736internal static async Task<bool> WriteGeneratedFileAsync(string filePath, string content, bool preserveUnchangedFiles, CancellationToken cancellationToken) 2116private async Task<int> InstallDependenciesAsync( 2178private async Task<(int ExitCode, OutputCollector? Output)> ExecuteGuestAppHostAsync( 2204private async Task<(int ExitCode, OutputCollector? Output)> ExecuteGuestAppHostForPublishAsync( 2228public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken)
Projects\GuestRuntime.cs (6)
93public async Task<(int ExitCode, OutputCollector Output)> InitializeAsync(DirectoryInfo directory, CancellationToken cancellationToken) 136public async Task<(int ExitCode, OutputCollector Output)> InstallDependenciesAsync( 200public async Task<(int ExitCode, OutputCollector? Output)> RunAsync( 244public async Task<(int ExitCode, OutputCollector? Output)> PublishAsync( 272private async Task<(int ExitCode, OutputCollector? Output)> RunPreExecuteCommandsAsync( 572private async Task<(int ExitCode, OutputCollector? Output)> ExecuteCommandAsync(
Projects\IAppHostProject.cs (9)
182Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken = default); 211Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken); 219Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken); 227Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken); 235Task<string?> GetAspireHostingVersionAsync(FileInfo appHostFile, CancellationToken cancellationToken); 243Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken); 251Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken); 260Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken); 268Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken);
Projects\IAppHostRpcClient.cs (9)
24Task<RuntimeSpec> GetRuntimeSpecAsync(string languageId, CancellationToken cancellationToken); 30Task<Dictionary<string, string>> ScaffoldAppHostAsync( 42Task<Dictionary<string, string>> GenerateCodeAsync(string languageId, CancellationToken cancellationToken); 54Task<Dictionary<string, string>> GenerateCodeForAssemblyAsync(string languageId, string assemblyName, CancellationToken cancellationToken); 62Task<CapabilitiesInfo> GetCapabilitiesAsync(CancellationToken cancellationToken); 73Task<CapabilitiesInfo> GetCapabilitiesForAssembliesAsync(IReadOnlyList<string> assemblyNames, CancellationToken cancellationToken); 86Task<JsonElement> ExportApiAsync(string languageId, string packageName, string packageVersion, CancellationToken cancellationToken); 96Task<T> InvokeAsync<T>(string methodName, object?[] parameters, CancellationToken cancellationToken); 113Task<IAppHostRpcClient> ConnectAsync(string socketPath, string authenticationToken, CancellationToken cancellationToken);
Projects\IAppHostServerProject.cs (2)
98Task<AppHostServerPrepareResult> PrepareAsync( 125Task<AppHostServerRunResult> RunAsync(
Projects\IAppHostServerSession.cs (2)
59Task<int> WaitForExitAsync(); 64Task<IAppHostRpcClient> GetRpcClientAsync(CancellationToken cancellationToken);
Projects\IGuestAppHostSdkGenerator.cs (1)
18Task<bool> BuildAndGenerateSdkAsync(DirectoryInfo directory, string? packageSourceOverride = null, CancellationToken cancellationToken = default);
Projects\IGuestProcessLauncher.cs (1)
49Task<(int ExitCode, OutputCollector? Output)> LaunchAsync(
Projects\ILanguageDiscovery.cs (4)
137Task<IEnumerable<LanguageInfo>> GetAvailableLanguagesAsync(CancellationToken cancellationToken = default); 145Task<string?> GetPackageForLanguageAsync(LanguageId languageId, CancellationToken cancellationToken = default); 154Task<LanguageId?> DetectLanguageAsync(DirectoryInfo directory, CancellationToken cancellationToken = default); 165Task<LanguageId?> DetectLanguageRecursiveAsync(DirectoryInfo directory, CancellationToken cancellationToken = default);
Projects\ILanguageService.cs (4)
16Task<IAppHostProject?> GetConfiguredProjectAsync(CancellationToken cancellationToken = default); 31Task<IAppHostProject> PromptForProjectAsync(CancellationToken cancellationToken = default); 40Task<IAppHostProject> GetOrPromptForProjectAsync(string? explicitLanguageId = null, bool saveLanguageSelection = true, CancellationToken cancellationToken = default); 49Task<AppHostProjectSelection> GetOrPromptForProjectSelectionAsync(string? explicitLanguageId = null, bool saveLanguageSelection = true, CancellationToken cancellationToken = default);
Projects\LanguageService.cs (5)
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) 106public async Task<IAppHostProject> GetOrPromptForProjectAsync( 117public async Task<AppHostProjectSelection> GetOrPromptForProjectSelectionAsync(
Projects\LegacyTypeScriptAppHost.cs (1)
142internal static async Task<FileInfo?> ResolveTypeScriptAppHostAsync(
Projects\PrebuiltAppHostServer.cs (13)
144public async Task<AppHostServerPrepareResult> PrepareAsync( 302private async Task<string> RestoreNuGetPackagesAsync( 361internal static async Task<RestoreInputs> ComputeRestoreInputsAsync( 709private async Task<(int ExitCode, OutputCollector Output)> BuildIntegrationProjectAsync( 733private async Task<AppHostServerClosureManifest> BuildIntegrationClosureManifestAsync( 1008internal async Task<IEnumerable<string>?> GetNuGetSourcesAsync(string? requestedChannel, string? packageSourceOverride, CancellationToken cancellationToken) 1091internal async Task<TemporaryNuGetConfig?> TryCreateTemporaryNuGetConfigAsync(string? requestedChannel, string? packageSourceOverride, CancellationToken cancellationToken) 1252private async Task<string?> ResolveLocalPackageSourceOverrideAsync(string? requestedChannel, CancellationToken cancellationToken) 1318private async Task<IEnumerable<PackageChannel>> GetExplicitRestoreChannelsAsync(string? requestedChannel, CancellationToken cancellationToken) 1350public async Task<AppHostServerRunResult> RunAsync( 1540private async Task<List<string>> ReadProjectRefAssemblyNamesAsync(string filePath, CancellationToken cancellationToken) 1552private static async Task<List<string>> ReadManifestFileAsync(string filePath, CancellationToken cancellationToken) 1585private static async Task<Dictionary<string, string>> ReadPackageFingerprintsAsync(string assetsFilePath, CancellationToken cancellationToken)
Projects\ProcessGuestLauncher.cs (1)
38public async Task<(int ExitCode, OutputCollector? Output)> LaunchAsync(
Projects\ProjectLocator.cs (24)
34Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync( 73Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, int? maxDepth, CancellationToken cancellationToken) 85Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken); 95Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, int? maxDepth, CancellationToken cancellationToken) 99Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default); 101Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, bool displayProgress, CancellationToken cancellationToken = default) 104Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken); 120Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default); 126Task<FileInfo?> GetAppHostFromSettingsAsync(DirectoryInfo searchDirectory, bool searchParentDirectories, CancellationToken cancellationToken = default) 164public async Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync( 180public async Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, int? maxDepth, CancellationToken cancellationToken) 255public async Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 268public async Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, int? maxDepth, CancellationToken cancellationToken) 280public async Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken) 289private async Task<(List<AppHostProjectCandidate> BuildableAppHost, List<AppHostProjectCandidate> UnbuildableSuspectedAppHostProjects, List<FileInfo> UnsupportedProjects)> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, bool stopAfterMultipleBuildableAppHosts, bool displayProgress, AppHostDiscoveryScope scope, int? maxDepth, ChannelWriter<AppHostProjectCandidate>? candidateWriter = null, Action<int>? onDirectoryEnumerated = null, CancellationToken cancellationToken = default) 293async Task<(List<AppHostProjectCandidate> BuildableAppHost, List<AppHostProjectCandidate> UnbuildableSuspectedAppHostProjects, List<FileInfo> UnsupportedProjects)> FindAppHostsAsync() 563public async Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) 569public async Task<FileInfo?> GetAppHostFromSettingsAsync(DirectoryInfo searchDirectory, bool searchParentDirectories, CancellationToken cancellationToken = default) 636private async Task<SettingsAppHostResult> GetValidatedAppHostProjectFileFromSettingsAsync(DirectoryInfo searchDirectory, bool searchParentDirectories, CancellationToken cancellationToken) 683private async Task<FileInfo?> GetAppHostProjectFileFromSettingsAsync(DirectoryInfo searchDirectory, bool searchParentDirectories, bool silent, CancellationToken cancellationToken) 876public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 881public async Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, bool displayProgress, CancellationToken cancellationToken = default) 1210public async Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken = default) 1369private async Task<FileLock?> TryAcquireWorkspaceConfigLockAsync(FileInfo settingsFile, CancellationToken cancellationToken)
Projects\ProjectUpdater.cs (11)
26Task<ProjectUpdateResult> UpdateProjectAsync(UpdatePackagesContext context, CancellationToken cancellationToken = default); 31public async Task<ProjectUpdateResult> UpdateProjectAsync(UpdatePackagesContext context, CancellationToken cancellationToken = default) 222private async Task<(IEnumerable<UpdateStep> UpdateSteps, bool FallbackUsed)> GetUpdateStepsAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken) 306private async Task<JsonDocument> GetItemsAndPropertiesAsync(FileInfo projectFile, CancellationToken cancellationToken) 311private async Task<JsonDocument> GetItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, CancellationToken cancellationToken) 331private async Task<JsonDocument> GetItemsAndPropertiesWithFallbackAsync(FileInfo projectFile, UpdateContext context, CancellationToken cancellationToken) 336private async Task<JsonDocument> GetItemsAndPropertiesWithFallbackAsync(FileInfo projectFile, string[] items, string[] properties, UpdateContext context, CancellationToken cancellationToken) 377private async Task<NuGetPackageCli?> GetLatestVersionOfPackageAsync(UpdateContext context, string packageId, bool throwIfNotFound = true, CancellationToken cancellationToken = default) 1111private async Task<string?> GetPackageVersionFromDirectoryPackagesPropsAsync(string packageId, FileInfo directoryPackagesPropsFile, FileInfo projectFile, CancellationToken cancellationToken) 1181private async Task<string?> ResolveMSBuildPropertyAsync(string propertyName, FileInfo projectFile, CancellationToken cancellationToken) 1251private async Task<bool> AnalyzeAndConfirmNuGetConfigChanges(UpdatePackagesContext context, XmlDocument? originalDocument, XmlDocument proposedDocument, CancellationToken cancellationToken)
Projects\RunningInstanceManager.cs (3)
48public async Task<bool> StopRunningInstanceAsync(IAppHostSocket appHostSocket, CancellationToken cancellationToken) 98public async Task<bool> StopAndMonitorAsync(IAppHostAuxiliaryBackchannel backchannel, CancellationToken cancellationToken) 117public 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)
36Task<bool> ScaffoldAsync(ScaffoldContext context, CancellationToken cancellationToken);
Scaffolding\ScaffoldingService.cs (3)
72public async Task<bool> ScaffoldAsync(ScaffoldContext context, CancellationToken cancellationToken) 82private async Task<bool> ScaffoldGuestLanguageAsync(ScaffoldContext context, CancellationToken cancellationToken) 419private async Task<int> InstallDependenciesAsync(
Secrets\SecretStoreResolver.cs (1)
19public async Task<SecretsStoreResult?> ResolveAsync(
src\Shared\ContainerRuntimeDetector.cs (4)
110public static async Task<ContainerRuntimeInfo?> FindAvailableRuntimeAsync(string? configuredRuntime = null, ILogger? logger = null, CancellationToken cancellationToken = default) 135public static async Task<ContainerRuntimeInfo> CheckRuntimeAsync(string executable, string name, bool isDefault, ILogger? logger = null, CancellationToken cancellationToken = default) 248private static async Task<bool> IsCliInstalledAsync(string executable, CancellationToken cancellationToken) 325private static async Task<RuntimeVersionInfo> GetVersionInfoAsync(string executable, CancellationToken cancellationToken)
src\Shared\FileLock.cs (1)
106public static async Task<FileLock> AcquireAsync(string lockPath, CancellationToken cancellationToken = default, TimeSpan? timeout = null)
Telemetry\AspireCliTelemetry.cs (6)
130internal async Task<IReadOnlyList<KeyValuePair<string, object?>>> GetDefaultTagsAsync() 295var macAddressHashTask = _machineInformationProvider.GetMacAddressHash(); 296var deviceIdTask = _machineInformationProvider.GetOrCreateDeviceId(); 298Task<InternalMicrosoftDetectionResult>? internalMicrosoftTask = null; 389internal async Task<InternalMicrosoftDetectionResult> GetInternalMicrosoftResultAsync(CancellationTokenSource? timeoutSource, TimeProvider timeProvider) 432private async Task EmitInternalMicrosoftDetectorDiagnosticsAsync(Task<InternalMicrosoftDetectionResult?> resultTask)
Telemetry\DefaultMachineInformationProvider.cs (1)
21public override Task<string?> GetOrCreateDeviceId() => Task.FromResult<string?>(null);
Telemetry\IMachineInformationProvider.cs (2)
15Task<string?> GetOrCreateDeviceId(); 20Task<string> GetMacAddressHash();
Telemetry\InternalMicrosoftDetector.cs (30)
26Task<InternalMicrosoftDetectionResult> IsInternalMicrosoftMachineAsync(CancellationToken cancellationToken = default); 110public async Task<InternalMicrosoftDetectionResult> IsInternalMicrosoftMachineAsync(CancellationToken cancellationToken = default) 240private async Task<InternalMicrosoftDetectionResult> RunProbeStagesAsync( 287private async Task<InternalMicrosoftProbeStageResult> RunProbeStageAsync(IReadOnlyList<InternalMicrosoftProbe> probes, CancellationToken cancellationToken) 320foreach (var task in probeTasks) 362private Task<InternalMicrosoftProbeRunResult> RunProbeAsync(InternalMicrosoftProbe probe, CancellationToken cancellationToken) 467private async Task DrainCancelledProbesAsync(IReadOnlyList<Task<InternalMicrosoftProbeRunResult>> probeTasks) 489private async Task<InternalMicrosoftCacheReadResult> TryReadCacheAsync(CancellationToken cancellationToken) 587internal Task<InternalMicrosoftProbeResult> CheckWindowsUserDnsDomainAsync(CancellationToken cancellationToken) 597private async Task<InternalMicrosoftProbeResult> CheckWslWindowsUserDnsDomainAsync(CancellationToken cancellationToken) 620private async Task<InternalMicrosoftProbeResult> CheckVisualStudioMicrosoftTenantAsync(CancellationToken cancellationToken) 648private async Task<InternalMicrosoftProbeResult> CheckWslVisualStudioMicrosoftTenantAsync(CancellationToken cancellationToken) 667internal async Task<InternalMicrosoftProbeResult> CheckMacPlatformSsoAsync(CancellationToken cancellationToken) 789internal async Task<InternalMicrosoftProbeResult> CheckWindowsWorkplaceJoinAsync(CancellationToken cancellationToken) 807private async Task<InternalMicrosoftProbeResult> CheckWslWindowsWorkplaceJoinAsync(CancellationToken cancellationToken) 823private Task<InternalMicrosoftProbeResult> CheckGhCliAsync(CancellationToken cancellationToken) 826private Task<InternalMicrosoftProbeResult> CheckWslWindowsGhCliAsync(CancellationToken cancellationToken) 829internal async Task<InternalMicrosoftProbeResult> CheckGhCliExecutableAsync(string executable, CancellationToken cancellationToken) 860private async Task<InternalMicrosoftProbeResult> CheckEnvironmentGitHubTokenAsync(CancellationToken cancellationToken) 876internal async Task<InternalMicrosoftProbeResult> CheckCopilotCliAsync(CancellationToken cancellationToken) 909private async Task<GitHubMembershipCheckResult> CheckAnyGitHubMembershipCandidateAsync(IReadOnlyList<TokenCandidate> candidates, CancellationToken cancellationToken) 928var completedTask = await Task.WhenAny(candidateTasks).WaitAsync(linkedSource.Token).ConfigureAwait(false); 961private async Task<GitHubMembershipCheckResult> CheckGitHubMembershipCandidateAsync(TokenCandidate candidate, CancellationToken cancellationToken) 988private async Task DrainGitHubCandidateTasksAsync(IReadOnlyList<Task<GitHubMembershipCheckResult>> candidateTasks) 1008internal async Task<bool> CheckGitHubMembershipWithTokenAsync(string token, CancellationToken cancellationToken) 1014internal async Task<InternalMicrosoftProbeResult> CheckGitHubMembershipWithTokenResultForTestingAsync(string token, CancellationToken cancellationToken) 1020private static async Task<GitHubMembershipCheckResult> CheckGitHubMembershipWithTokenAsync(HttpClient http, string token, CancellationToken cancellationToken) 1117private static async Task<string?> ReadJsonPropertyAsync(HttpResponseMessage response, string propertyName, CancellationToken cancellationToken) 1123private async Task<ProcessResult> RunProcessAsync(string fileName, string[] arguments, CancellationToken cancellationToken) 1917Func<CancellationToken, Task<InternalMicrosoftProbeResult>> DetectAsync,
Telemetry\MachineInformationProviderBase.cs (2)
31public abstract Task<string?> GetOrCreateDeviceId(); 34public virtual Task<string> GetMacAddressHash()
Telemetry\TelemetryTagsSource.cs (4)
16private volatile Task<IReadOnlyList<KeyValuePair<string, object?>>>? _tagsTask; 28public Task<IReadOnlyList<KeyValuePair<string, object?>>> TagsTask => 43var tagsTask = TagsTask; 62public void StartCalculation(Func<Task<IReadOnlyList<KeyValuePair<string, object?>>>> factory)
Telemetry\UnixMachineInformationProvider.cs (3)
23public override async Task<string?> GetOrCreateDeviceId() 62public virtual async Task<bool> WriteValueToDisk(string directoryPath, string fileName, string? value) 102public virtual async 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, 52public Task<TemplateResult> ApplyTemplateAsync(TemplateInputs inputs, ParseResult parseResult, CancellationToken cancellationToken)
Templating\CliTemplateFactory.cs (3)
106public Task<IEnumerable<ITemplate>> GetTemplatesAsync(CancellationToken cancellationToken = default) 111public Task<IEnumerable<ITemplate>> GetInitTemplatesAsync(CancellationToken cancellationToken = default) 252private async Task<string?> ResolveOutputPathAsync(TemplateInputs inputs, Func<CliExecutionContext, string, string> pathDeriver, string projectName, System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken)
Templating\CliTemplateFactory.EmptyTemplate.cs (3)
14private async Task<TemplateResult> ApplyEmptyAppHostTemplateAsync(CallbackTemplate template, TemplateInputs inputs, System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken) 67(Func<Task<TemplateResult>>)(async () => 131private async Task<bool> ResolveUseLocalhostTldAsync(System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken)
Templating\CliTemplateFactory.GoStarterTemplate.cs (2)
14private async Task<TemplateResult> ApplyGoStarterTemplateAsync(CallbackTemplate template, TemplateInputs inputs, System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken) 50(Func<Task<TemplateResult>>)(async () =>
Templating\CliTemplateFactory.JavaStarterTemplate.cs (2)
14private async Task<TemplateResult> ApplyJavaStarterTemplateAsync(CallbackTemplate template, TemplateInputs inputs, System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken) 50(Func<Task<TemplateResult>>)(async () =>
Templating\CliTemplateFactory.PythonStarterTemplate.cs (3)
15private async Task<TemplateResult> ApplyPythonStarterTemplateAsync(CallbackTemplate template, TemplateInputs inputs, System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken) 52(Func<Task<TemplateResult>>)(async () => 127private async Task<bool> ResolveUseRedisCacheAsync(System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken)
Templating\CliTemplateFactory.TypeScriptStarterTemplate.cs (2)
15private async Task<TemplateResult> ApplyTypeScriptStarterTemplateAsync(CallbackTemplate template, TemplateInputs inputs, System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken) 51(Func<Task<TemplateResult>>)(async () =>
Templating\DotNetTemplateFactory.cs (16)
66public async Task<IEnumerable<ITemplate>> GetTemplatesAsync(CancellationToken cancellationToken = default) 77public async Task<IEnumerable<ITemplate>> GetInitTemplatesAsync(CancellationToken cancellationToken = default) 87private async Task<bool> IsDotNetSdkAvailableAsync(CancellationToken cancellationToken) 248private async Task<string[]> PromptForExtraAspireStarterOptionsAsync(ParseResult result, CancellationToken cancellationToken) 259private async Task<string[]> PromptForExtraAspireSingleFileOptionsAsync(ParseResult result, CancellationToken cancellationToken) 268private async Task<string[]> PromptForExtraAspireJsFrontendStarterOptionsAsync(ParseResult result, CancellationToken cancellationToken) 278private async Task<string[]> PromptForExtraAspireXUnitOptionsAsync(ParseResult result, CancellationToken cancellationToken) 407private async Task<TemplateResult> ApplyTemplateWithNoExtraArgsAsync(CallbackTemplate template, TemplateInputs inputs, ParseResult parseResult, CancellationToken cancellationToken) 412private async Task<TemplateResult> ApplySingleFileTemplate(CallbackTemplate template, TemplateInputs inputs, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 439private async Task<TemplateResult> ApplyTemplateAsync(CallbackTemplate template, TemplateInputs inputs, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 457private async Task<TemplateResult> ApplyTemplateAsync(CallbackTemplate template, TemplateInputs inputs, string name, string outputPath, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 592private async Task<string> GetProjectNameAsync(TemplateInputs inputs, string templateName, ParseResult parseResult, CancellationToken cancellationToken) 603private async Task<string?> GetOutputPathAsync(TemplateInputs inputs, Func<CliExecutionContext, string, string> pathDeriver, string projectName, ParseResult parseResult, CancellationToken cancellationToken)
Templating\ITemplate.cs (1)
73Task<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\OutputPathHelper.cs (3)
17internal static async Task<string?> ResolveOutputPathAsync( 20Func<Task<string>> promptCallback, 88internal static async Task<bool> PromptExtensionCreateProjectNameSubdirectoryAsync(
Templating\TemplateNuGetConfigService.cs (5)
132public async Task<bool> CreateOrUpdateNuGetConfigWithoutPromptAsync(string? channelName, string outputPath, CancellationToken cancellationToken) 181public async Task<bool> CreateOrUpdateNuGetConfigForSourceOverrideAsync( 207public static async Task<bool> CreateOrUpdateNuGetConfigForSourceOverrideAsync( 236public async Task<TemplatePackageSelection> ResolveTemplatePackageAsync(TemplatePackageQuery query, CancellationToken cancellationToken) 413public async Task<TemplateInstallOutcome> InstallTemplatePackageAsync(
Templating\TemplateProvider.cs (2)
28public async Task<IEnumerable<ITemplate>> GetTemplatesAsync(CancellationToken cancellationToken = default) 34public async Task<IEnumerable<ITemplate>> GetInitTemplatesAsync(CancellationToken cancellationToken = default)
Tui\TerminalViewerApp.cs (2)
139public async Task<int> RunAsync(CancellationToken cancellationToken) 208var embeddedTask = _embedded.RunAsync(_embeddedCts.Token);
Utils\AppHostHelper.cs (3)
16internal static async Task<(bool IsCompatibleAppHost, string? AspireHostingVersion)> CheckAppHostCompatibilityAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, AspireCliTelemetry telemetry, DirectoryInfo workingDirectory, string logFilePath, CancellationToken cancellationToken) 71internal static async Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, AspireCliTelemetry telemetry, DirectoryInfo workingDirectory, CancellationToken cancellationToken) 87internal static async Task<int> BuildAppHostAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, bool noRestore, IDictionary<string, string>? env, ProcessInvocationOptions options, DirectoryInfo workingDirectory, CancellationToken cancellationToken)
Utils\CliDownloader.cs (2)
18Task<string> DownloadLatestCliAsync(string channelName, CancellationToken cancellationToken); 32public async Task<string> DownloadLatestCliAsync(string channelName, CancellationToken cancellationToken)
Utils\CliUpdateNotifier.cs (3)
17Task<CliVersionStatus> GetVersionStatusAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken); 69public async Task<CliVersionStatus> GetVersionStatusAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken) 157private async Task<IEnumerable<Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken)
Utils\EnvironmentChecker\AspireVersionCheck.cs (5)
33public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default) 71private async Task<EnvironmentCheckResult> GetCliVersionCheckAsync(CancellationToken cancellationToken) 219private async Task<EnvironmentCheckResult?> GetAppHostVersionCheckAsync(CancellationToken cancellationToken) 368private async Task<IReadOnlyList<FileInfo>> ResolveAppHostFilesAsync(CancellationToken cancellationToken) 398private async Task<(bool IsAppHost, string? Version)> ResolveAppHostVersionAsync(FileInfo appHostFile, CancellationToken cancellationToken)
Utils\EnvironmentChecker\ContainerRuntimeCheck.cs (3)
28public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default) 33var dockerTask = ContainerRuntimeDetector.CheckRuntimeAsync(KnownContainerRuntimes.Docker, "Docker", isDefault: true, logger, cancellationToken); 34var podmanTask = ContainerRuntimeDetector.CheckRuntimeAsync(KnownContainerRuntimes.Podman, "Podman", isDefault: false, logger, cancellationToken);
Utils\EnvironmentChecker\DcpConnectionChecker.cs (4)
20Task<EnvironmentCheckResult> TestConnectionAsync(string dcpDirectory, bool useDeveloperCertificate, CancellationToken cancellationToken); 33public async Task<EnvironmentCheckResult> TestConnectionAsync(string dcpDirectory, bool useDeveloperCertificate, CancellationToken cancellationToken) 218public static async Task<DcpConnectionTestSession> StartAsync( 316public async Task<DcpKubeconfig> ReadKubeconfigAsync(CancellationToken cancellationToken)
Utils\EnvironmentChecker\DcpConnectionHealthCheck.cs (3)
28public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default) 59var ephemeralCertificateTask = connectionTester.TestConnectionAsync( 64var developerCertificateTask = connectionTester.TestConnectionAsync(
Utils\EnvironmentChecker\DcpKubeconfig.cs (1)
23internal static async Task<DcpKubeconfig> ReadFileWithRetryAsync(string path, Func<TimeSpan, CancellationToken, Task>? delayAsync = null, CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\DeprecatedAgentConfigCheck.cs (1)
39public Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\DeprecatedWorkloadCheck.cs (1)
32public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\DevCertsCheck.cs (4)
35public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default) 267private async Task<OpenSslCertificateCacheStatus?> EvaluateOpenSslCertificateCacheAsync(string trustPath, IReadOnlyList<DevCertInfo> currentCertificates, string? openSslPath, CancellationToken cancellationToken) 361private async Task<bool> HasOpenSslHashEntryAsync(string trustPath, string certificateFile, X509Certificate2 certificate, string? openSslPath, CancellationToken cancellationToken) 408private async Task<(bool Success, string Hash)> TryGetOpenSslHashAsync(string openSslPath, string certificateFile, CancellationToken cancellationToken)
Utils\EnvironmentChecker\DotNetSdkCheck.cs (2)
28public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default) 91private async Task<bool> IsDotNetAppHostAsync(CancellationToken cancellationToken)
Utils\EnvironmentChecker\EnvironmentChecker.cs (2)
42public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAllAsync(CancellationToken cancellationToken = default) 64var checkTask = Task.Run(() => check.CheckAsync(checkTimeoutCts.Token), CancellationToken.None);
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\LegacySettingsFileCheck.cs (1)
29public Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\OperatingSystemCheck.cs (1)
35public Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\PendingMigrationsCheck.cs (1)
40public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\TypeScriptAppHostToolingCheck.cs (7)
24private readonly Func<string, CancellationToken, Task<string?>> _denoVersionResolver; 50Func<string, CancellationToken, Task<string?>> denoVersionResolver) 63public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default) 171private Task<FileInfo?> ResolveTypeScriptAppHostAsync(CancellationToken cancellationToken) 229private static async Task<string?> GetDenoVersionOutputAsync( 249var stdoutTask = process.StandardOutput.ReadToEndAsync(captureToken); 250var stderrTask = process.StandardError.ReadToEndAsync(captureToken);
Utils\EnvironmentChecker\VsCodeExtensionCheck.cs (1)
56public Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\WslEnvironmentCheck.cs (1)
36public Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\FileSystemHelper.cs (2)
16internal static async Task<string> TryReadAllTextAsync(string path, CancellationToken cancellationToken) 31internal static async Task<byte[]> TryReadAllBytesAsync(string path, CancellationToken cancellationToken)
Utils\ProcessCaptureRunner.cs (6)
21public static async Task<ProcessCaptureResult<TCapture>> RunAsync<TCapture>( 24Func<Process, CancellationToken, Task<TCapture>> captureAsync, 75Task<TCapture> captureTask; 220private static async Task<TCapture> SwallowCaptureAsync<TCapture>(Task<TCapture> task, Func<TCapture> createEmptyCapture, ILogger logger, TimeSpan? bound = null) 244private static void ObserveCaptureFault<TCapture>(Task<TCapture> task)
Utils\SdkInstallHelper.cs (1)
26public static async Task<bool> EnsureSdkInstalledAsync(
aspire-managed (8)
NuGet\Commands\ManifestCommand.cs (1)
69private static async Task<int> ExecuteManifestAsync(
NuGet\Commands\RestoreCommand.cs (1)
129private 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 (4)
32static async Task<int> RunDashboard(string[] args) 62static async Task<int> RunServer(string[] args) 68static async Task<int> RunNuGet(string[] args) 92static async Task<int> RunTerminalHost(string[] args)
Aspire.Acquisition.Tests (24)
Scripts\Common\FakeArchiveHelper.cs (5)
14public static async Task<FakeArchive> CreateFakeArchiveAsync( 62public static async Task<string> CreateFakeNupkgAsync(string outputDir, string packageName, string version) 71public static async Task<FakeArchive> CreateFakeArchiveWithBadChecksumAsync(string outputDir, string platform = "linux-x64") 92public static async Task<FakeArchive> CreateFakeVerifyArchiveAsync( 211private static async Task<string> ComputeSha512Async(string filePath)
Scripts\Common\RealGitHubPRFixture.cs (2)
86private async Task<bool> TryFindRunWithArtifactsAsync(int prNumber, string commitSha) 184private async Task<string> ExecuteGhJsonAsync(params string[] args)
Scripts\Common\TestEnvironment.cs (1)
40public async Task<string> CreateMockGhScriptAsync(ITestOutputHelper testOutput)
Scripts\PRScriptInstallerModeTests.cs (8)
18private async Task<ScriptToolCommand> CreateBashCommandWithMockGhAsync(TestEnvironment env) 26private async Task<ScriptToolCommand> CreatePsCommandWithMockGhAsync(TestEnvironment env) 34private static async Task<string> CreateHomebrewInstallerArtifactAsync(string root) 44private static async Task<string> CreateWinGetInstallerArtifactAsync(string root) 64private static async Task<(string ManifestDir, string ArchiveRoot)> CreateWinGetPrChannelArtifactAsync(string root, string version = "13.3.0") 109private static async Task<string> CreateMockHomebrewBinAsync(TestEnvironment env, int aspireExitCode, int codesignExitCode = 0) 232private static async Task<string> CreateMockWinGetBinAsync(TestEnvironment env, int aspireExitCode) 415private static async Task<string> GetSha256HexAsync(string path)
Scripts\PRScriptPowerShellTests.cs (1)
23private async Task<ScriptToolCommand> CreateCommandWithMockGhAsync(TestEnvironment env)
Scripts\PRScriptShellTests.cs (1)
21private async Task<ScriptToolCommand> CreateCommandWithMockGhAsync(TestEnvironment env)
Scripts\PRScriptToolModeTests.cs (4)
23private static async Task<string> CreateLocalDirWithAspireCliPackageAsync(string root, string version = "13.3.0-pr.1234.abc") 31private async Task<ScriptToolCommand> CreateBashCommandWithMockGhAsync(TestEnvironment env) 39private async Task<ScriptToolCommand> CreatePsCommandWithMockGhAsync(TestEnvironment env) 47private static async Task<string> CreateMockDotnetScriptAsync(TestEnvironment env, 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.Azure.AI.Inference (2)
AzureAIInferenceChatCompletionsHealthCheck.cs (1)
16public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
AzureAIInferenceEmbeddingsHealthCheck.cs (1)
16public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
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 (6)
Helpers\CliE2ETestHelpers.cs (6)
143var pendingRun = terminal.RunAsync(cancellationToken); 630internal static async Task<string?> TryGetLatestStableAspireVersionAsync(Action<string> log, CancellationToken cancellationToken) 715internal static async Task<StagingBuildIdentity?> TryGetLatestStagingBuildAsync(Action<string> log, CancellationToken cancellationToken) 782private static async Task<string?> ResolveLatestStagingVersionAsync(Action<string> log, CancellationToken cancellationToken) 816private static async Task<IReadOnlyList<string>> GetRecentBranchCommitShasAsync(string branch, int commitCount, Action<string> log, CancellationToken cancellationToken) 865private static async Task<string?> TryGetMatchingTemplateVersionAsync(string commitSha, string releaseVersion, CancellationToken cancellationToken)
Aspire.Cli.Tests (691)
Acquisition\PeerInstallProbeTests.cs (3)
397var probeTask = probe.ProbeAsync(fakePeer.Path, cts.Token); 408private async Task<PeerProbeResult.Failed> ProbeFakeFailureAsync(FakeScriptResult fakePeer) 427private static async Task<Process> WaitForProcessIdAsync(string pidFile, CancellationToken cancellationToken)
Agents\AspireSkillsBundleTests.cs (1)
819private static Task<AspireSkillsBundle> LoadBundleAsync(
Agents\AspireSkillsInstallerTests.cs (10)
116var installTask = installer.InstallAsync(CancellationToken.None); 726var installTask = installer.InstallAsync(CancellationToken.None); 923var installTask = installer.InstallAsync(cancellationTokenSource.Token); 982Task<AspireSkillsInstallResult>? firstInstallTask = null; 2086private static async Task<byte[]> CreateBundleArchiveBytesAsync( 2159private static async Task<TestEmbeddedAspireSkillsBundleProvider> CreateEmbeddedBundleProviderAsync(SkillBundleSupports? supports = null) 2236public async Task<ProvenanceVerificationResult> VerifyAsync( 2272public async Task<AspireSkillsBundle?> CreateBundleAsync( 2305public async Task<AspireSkillsBundle> CreateAsync( 2326public Task<AspireSkillsBundle> LoadAsync(
Agents\ClaudeCodeAgentEnvironmentScannerTests.cs (1)
131public Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken)
Agents\CommonAgentApplicatorsTests.cs (1)
158private static async Task<IReadOnlyList<SkillAssetFile>> GetInstallableSkillFilesAsync(SkillDefinition skill)
Agents\CopilotAgentEnvironmentScannerTests.cs (1)
383public Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken)
Agents\OpenCodeAgentEnvironmentScannerTests.cs (1)
116public Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken)
Agents\PlaywrightCliInstallerTests.cs (6)
1013public Task<NpmPackageInfo?> ResolvePackageAsync(string packageName, string versionRange, CancellationToken cancellationToken) 1019public Task<string?> PackAsync(string packageName, string version, string outputDirectory, CancellationToken cancellationToken) 1031public Task<bool> InstallGlobalAsync(string tarballPath, CancellationToken cancellationToken) 1045public Task<ProvenanceVerificationResult> VerifyProvenanceAsync(string packageName, string version, string expectedSourceRepository, string expectedWorkflowPath, string expectedBuildType, Func<WorkflowRefInfo, bool>? validateWorkflowRef, string? sriIntegrity, CancellationToken cancellationToken) 1068public Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken) 1071public Task<bool> InstallSkillsAsync(string workingDirectory, CancellationToken cancellationToken)
Agents\SigstoreNpmProvenanceCheckerTests.cs (1)
1150private static async Task<ProvenanceVerificationResult> VerifyThroughCheckerAsync(
Agents\TelemetryHookConfiguratorTests.cs (1)
242private static async Task<JsonArray> ReadClaudePostToolUseAsync(DirectoryInfo home)
Agents\TelemetryHookScriptTests.cs (5)
430private async Task<HookRun> RunBashHookAsync(string payload, Dictionary<string, string?>? extraEnv = null) 442private async Task<HookRun> RunPwshHookAsync(string payload, Dictionary<string, string?>? extraEnv = null) 455private static async Task<TelemetryHookScripts> MaterializeScriptsAsync(TemporaryWorkspace workspace) 575var stdoutTask = process.StandardOutput.ReadToEndAsync(); 576var stderrTask = process.StandardError.ReadToEndAsync();
Agents\VsCodeAgentEnvironmentScannerTests.cs (1)
361public Task<SemVersion?> GetVersionAsync(VsCodeRunOptions options, CancellationToken cancellationToken) => Task.FromResult(version);
Backchannel\AppHostAuxiliaryBackchannelTests.cs (8)
102var connectTask = server.ConnectAsync(TimeSpan.FromSeconds(3)); 131public Task<AppHostAuxiliaryBackchannel> ConnectAsync() => ConnectAsyncCore(handshakeTimeout: null); 133public Task<AppHostAuxiliaryBackchannel> ConnectAsync(TimeSpan handshakeTimeout) => ConnectAsyncCore(handshakeTimeout); 135private async Task<AppHostAuxiliaryBackchannel> ConnectAsyncCore(TimeSpan? handshakeTimeout) 138var acceptTask = _listener.AcceptSocketAsync(); 197public async Task<AppHostInformation> GetAppHostInformationAsync(CancellationToken cancellationToken = default) 209public async Task<GetCapabilitiesResponse> GetCapabilitiesAsync(GetCapabilitiesRequest? request = null, CancellationToken cancellationToken = default) 221public Task<GetResourcesResponse> GetResourcesAsync(GetResourcesRequest? request = null, CancellationToken cancellationToken = default)
Backchannel\ResourceSnapshotWatcherTests.cs (3)
288var moveNextTask = consumer.MoveNextAsync().AsTask(); 339var firstMoveNextTask = firstConsumer.MoveNextAsync().AsTask(); 345var secondMoveNextTask = secondConsumer.MoveNextAsync().AsTask();
Certificates\UnixCertificateManagerTests.cs (3)
47var trustTask = Task.Run(() => manager.GetTrustLevel(certificate, cancellationTokenSource.Token)); 242private static async Task<FileInfo> CreateBlockingCertUtilAsync(DirectoryInfo directory, string parentPidFile, string childPidFile) 266private static async Task<FileInfo> CreateNoisyCertUtilAsync(DirectoryInfo directory)
CliBootstrapTests.cs (1)
31private static async Task<IHost> BuildHostAsync()
Commands\AddCommandTests.cs (3)
2947private async Task<(int ExitCode, string SelectedVersion, bool PromptInvoked)> RunAddRedisWithHiveScenarioAsync( 3562public override Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken) 3571public override Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, string? configuredChannel, CancellationToken cancellationToken)
Commands\AgentInitCommandTests.cs (3)
868private static async Task<AspireSkillsBundle> CreateBundleAsync(DirectoryInfo workspaceRoot, params (string Name, string Description)[] skills) 1001public Task<AgentEnvironmentApplicator[]> DetectAsync(AgentEnvironmentScanContext context, CancellationToken cancellationToken) 1015public Task<TelemetryHookConfigurationResult> ConfigureAsync(
Commands\AgentMcpCommandTests.cs (1)
29private async Task<McpTestContext> CreateMcpClientAsync(string? dashboardUrl = null)
Commands\AppHostLauncherTests.cs (14)
135var launchTask = harness.Launcher.LaunchDetachedAsync( 451var launchTask = harness.Launcher.LaunchDetachedAsync( 759var launchTask = harness.Launcher.LaunchDetachedAsync( 807var launchTask = harness.Launcher.LaunchDetachedAsync( 869var launchTask = harness.Launcher.LaunchDetachedAsync( 911var launchTask = harness.Launcher.LaunchDetachedAsync( 1460public Func<string, IReadOnlyList<string>, string, Func<string, bool>?, IReadOnlyDictionary<string, string>?, CancellationToken, Task<IProcessExecution>>? StartHandler { get; set; } 1490private Task<IProcessExecution> StartCoreAsync( 1610public async Task<bool> StartAsync(CancellationToken cancellationToken) 1616public Task<int> WaitForExitAsync(CancellationToken cancellationToken) => Inner.WaitForExitAsync(cancellationToken); 1655public Task<bool> StartAsync(CancellationToken cancellationToken) 1661public async Task<int> WaitForExitAsync(CancellationToken cancellationToken) 1723public Task<bool> StartAsync(CancellationToken cancellationToken) 1729public Task<int> WaitForExitAsync(CancellationToken cancellationToken)
Commands\BaseCommandTests.cs (2)
537var invokeTask = result.InvokeAsync(cancellationToken: cts.Token); 814protected override async Task<CommandResult> ExecuteAsync(System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken)
Commands\ConfigCommandTests.cs (6)
1031public Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 1036public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 1045public Task<Dictionary<string, string>> GetLocalConfigurationAsync(CancellationToken cancellationToken = default) 1053public Task<Dictionary<string, string>> GetGlobalConfigurationAsync(CancellationToken cancellationToken = default) 1058public Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default) 1063public Task<string?> GetConfigurationFromDirectoryAsync(string key, DirectoryInfo startDirectory, bool continueSearchWhenKeyMissing = false, CancellationToken cancellationToken = default)
Commands\DashboardRunCommandTests.cs (2)
198var pendingRun = result.InvokeAsync(); 463var pendingRun = result.InvokeAsync(cancellationToken: cts.Token);
Commands\DeployCommandTests.cs (1)
596public override Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken)
Commands\DescribeCommandTests.cs (1)
685var pendingRun = result.InvokeAsync(cancellationToken: cts.Token);
Commands\DocsCommandTests.cs (1)
314public Task<DocsSearchResponse?> SearchAsync(string query, int topK = 5, CancellationToken cancellationToken = default)
Commands\DoctorCommandTests.cs (1)
1007private async Task<JsonDocument> RunDoctorJsonAsync(
Commands\ExtensionInternalCommandTests.cs (32)
237public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync( 247public Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 252public Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 257public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 265public Task<AppHostProjectSearchResult> UseOrFindServiceProjectFileAsync( 274public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 282public Task<FileInfo?> UseOrFindSolutionFileAsync( 290public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 302public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync( 312public Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 317public Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 322public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 330public Task<AppHostProjectSearchResult> UseOrFindServiceProjectFileAsync( 339public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 347public Task<FileInfo?> UseOrFindSolutionFileAsync( 355public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 360public Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 365public Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 370public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync( 379public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 387public Task<AppHostProjectSearchResult> UseOrFindServiceProjectFileAsync( 396public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 404public Task<FileInfo?> UseOrFindSolutionFileAsync( 412public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 417public Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 422public Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 427public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync( 436public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 444public Task<AppHostProjectSearchResult> UseOrFindServiceProjectFileAsync( 453public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 461public Task<FileInfo?> UseOrFindSolutionFileAsync( 469public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null);
Commands\InitCommandTests.cs (2)
2361public Func<ScaffoldContext, CancellationToken, Task<bool>>? ScaffoldAsyncCallback { get; set; } 2363public Task<bool> ScaffoldAsync(ScaffoldContext context, CancellationToken cancellationToken)
Commands\InstallationInfoOutputTests.cs (1)
39var discoveryTask = InstallationInfoOutput.DiscoverAllSafelyAsync(
Commands\LogsCommandTests.cs (2)
963var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 1462var commandTask = result.InvokeAsync();
Commands\LsCommandTests.cs (2)
443var invokeTask = result.InvokeAsync(); 648var invokeTask = result.InvokeAsync();
Commands\NewCommandChannelResolutionTests.cs (3)
541private async Task<CapturedTemplateInputs> CaptureTemplateInputsAsync( 769public Task<IEnumerable<ITemplate>> GetTemplatesAsync(CancellationToken cancellationToken = default) => 771public Task<IEnumerable<ITemplate>> GetInitTemplatesAsync(CancellationToken cancellationToken = default) =>
Commands\NewCommandTemplateConfigPersistenceTests.cs (1)
354private async Task<string?> ScaffoldAndReadPersistedChannelAsync(
Commands\NewCommandTests.cs (1)
1585var invocationTask = result.InvokeAsync();
Commands\PsCommandTests.cs (6)
780public async Task<AppHostAuxiliaryBackchannel> ConnectAsync() 783var acceptTask = _listener.AcceptSocketAsync(); 810public Task<AppHostInformation> GetAppHostInformationAsync(CancellationToken cancellationToken = default) 821public Task<GetCapabilitiesResponse> GetCapabilitiesAsync(GetCapabilitiesRequest? request = null, CancellationToken cancellationToken = default) 835public Task<GetAppHostInfoResponse> GetAppHostInfoAsync(GetAppHostInfoRequest? request = null, CancellationToken cancellationToken = default) 848public Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken = default)
Commands\PublishCommandPromptingIntegrationTests.cs (13)
1097public Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) => 1118public Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken) => Task.FromResult(new[] { "baseline.v2" }); 1120public Task<GetPipelineStepsResponse> GetPipelineStepsAsync(string? step, CancellationToken cancellationToken) => 1123public Task<UploadFileResponse> UploadFileAsync(string filePath, string fileName, int interactionId, string inputName, CancellationToken cancellationToken) 1161public Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 1177public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 1180public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 1200public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 1218public Task<bool> PromptConfirmAsync(string promptText, PromptBinding<bool>? binding = null, CancellationToken cancellationToken = default) 1237public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) => action(); 1238public Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) => action(_ => { });
Commands\PublishCommandTests.cs (1)
238public override Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken)
Commands\RunCommandTests.cs (44)
498var pendingCommand = result.InvokeAsync(cancellationToken: cancellationManager.Token); 590var pendingCommand = result.InvokeAsync(cancellationToken: cts.Token); 793var pendingCommand = command.Parse($"run --apphost {appHostFile.FullName}") 887var pendingRun = result.InvokeAsync(cancellationToken: TestContext.Current.CancellationToken); 988var pendingCommand = result.InvokeAsync(cancellationToken: TestContext.Current.CancellationToken); 1086var pendingCommand = result.InvokeAsync(cancellationToken: cts.Token); 1167var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 1662public Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 1667public Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 1672public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 1677public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 1682public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 1745var pendingCommand = result.InvokeAsync(); 1815var pendingCommand = result.InvokeAsync(); 1999var pendingCommand = result.InvokeAsync(cancellationToken: cts.Token); 2070var pendingCommand = result.InvokeAsync(cancellationToken: cts.Token); 2178var pendingCommand = command.Parse($"run --apphost {appHostFile.FullName}") 2478public Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 2483public Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 2488public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 2493public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 2498public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 2503public Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 2508public Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 2513public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 2518public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 2523public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 2606var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 2674var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 2805var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 3056var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 3167var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 3273var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 3343var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 3412var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 3535var pendingRun = result.InvokeAsync(); 4158public Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 4164public Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 4169public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 4174public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 4180public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 4321var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 5248var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 5321var pendingRun = result.InvokeAsync(cancellationToken: cts.Token);
Commands\Sdk\SdkExportCommandTests.cs (5)
349private static async Task<int> InvokeAsync(ServiceProvider provider, string commandLine) 405public override Task<JsonElement> ExportApiAsync( 429public override Task<JsonElement> ExportApiAsync( 447public Task<AppHostServerPrepareResult> PrepareAsync( 459public Task<AppHostServerRunResult> RunAsync(
Commands\SecretCommandTests.cs (14)
89public Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 92public Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 95public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) 98public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 101public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 122public Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) => throw new NotSupportedException(); 124public Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) => throw new NotSupportedException(); 125public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken = default) => Task.FromResult<string[]>([]); 126public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken) => Task.FromResult<string?>(userSecretsId); 128public Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) => throw new NotSupportedException(); 129public Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) => throw new NotSupportedException(); 130public Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) => throw new NotSupportedException(); 131public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) => throw new NotSupportedException(); 132public Task<string?> GetAspireHostingVersionAsync(FileInfo appHostFile, CancellationToken cancellationToken) => throw new NotSupportedException();
Commands\StartCommandTests.cs (2)
753public Task<bool> StartAsync(CancellationToken cancellationToken) 760public Task<int> WaitForExitAsync(CancellationToken cancellationToken)
Commands\TerminalCommandTests.cs (11)
682public Task<GetTerminalInfoResponse> GetTerminalInfoAsync(string resourceName, CancellationToken cancellationToken = default) 688public Task<ListTerminalsResponse> ListTerminalsAsync(CancellationToken cancellationToken = default) 693public Task<global::Aspire.Cli.Backchannel.DashboardUrlsState?> GetDashboardUrlsAsync(CancellationToken cancellationToken = default) 695public Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(bool includeHidden, CancellationToken cancellationToken = default) 701public Task<bool> StopAppHostAsync(CancellationToken cancellationToken = default) 703public Task<ExecuteResourceCommandResponse> ExecuteResourceCommandAsync(string resourceName, string commandName, ExecuteResourceCommandOptions? options = null, CancellationToken cancellationToken = default) 705public Task<WaitForResourceResponse> WaitForResourceAsync(string resourceName, string status, int timeoutSeconds, CancellationToken cancellationToken = default) 707public Task<global::ModelContextProtocol.Protocol.CallToolResult> CallResourceMcpToolAsync(string resourceName, string toolName, IReadOnlyDictionary<string, global::System.Text.Json.JsonElement>? arguments, CancellationToken cancellationToken = default) 709public Task<GetDashboardInfoResponse?> GetDashboardInfoV2Async(CancellationToken cancellationToken = default) 712public Task<GetAppHostInfoResponse?> GetAppHostInfoV2Async(CancellationToken cancellationToken = default) 715public Task<WaitForAppHostReadyResponse?> WaitForAppHostReadyAsync(CancellationToken cancellationToken = default)
Commands\TypeScriptAppHostToolingCheckTests.cs (1)
251Func<string, CancellationToken, Task<string?>>? denoVersionResolver = null)
Commands\UpdateCommandTests.cs (16)
2794private Task<(int ExitCode, string UpdatedWithChannel, bool PromptInvoked)> RunUpdateAndCaptureChannelAsync( 2801private Task<(int ExitCode, string UpdatedWithChannel, bool PromptInvoked)> RunUpdateAndCaptureChannelAsync( 2815private async Task<(int ExitCode, string UpdatedWithChannel, bool PromptInvoked)> RunUpdateAndCaptureChannelAsync( 3243private async Task<(int ExitCode, string? CapturedChannel, bool PromptInvoked, TestInteractionService InteractionService)> RunNonInteractiveSelfUpdateAsync( 3291private static async Task<string> CreateSelfUpdateArchiveAsync( 3522public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) => _innerService.ShowStatusAsync(statusText, action, emoji, allowMarkup); 3523public Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) => _innerService.ShowDynamicStatusAsync(initialStatusText, action, emoji); 3525public Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 3527public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 3529public Task<bool> PromptConfirmAsync(string promptText, PromptBinding<bool>? binding = null, CancellationToken cancellationToken = default) 3531public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 3533public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 3563public Func<UpdatePackagesContext, CancellationToken, Task<ProjectUpdateResult>>? UpdateProjectAsyncCallback { get; set; } 3565public Task<ProjectUpdateResult> UpdateProjectAsync(UpdatePackagesContext context, CancellationToken cancellationToken = default)
ConsoleCancellationManagerTests.cs (1)
218var ladderTask = Task.Run(async () =>
DotNet\DotNetCliRunnerTests.cs (3)
1052var runTask = runner.RunAsync( 2748public Task<bool> StartAsync(CancellationToken cancellationToken) 2755public Task<int> WaitForExitAsync(CancellationToken cancellationToken) => Task.FromResult(exitCode);
DotNet\ProcessExecutionDetachedTests.cs (8)
168var startTask = detachedExecution.StartAsync(cts.Token); 448var startTask = detachedProcess.StartAsync(CancellationToken.None); 545public Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default) 553public Task<BundleLayoutLease?> EnsureExtractedAndAcquireLayoutAsync(string holderKind, string? commandName = null, CancellationToken cancellationToken = default) 578public Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default) 586public Task<BundleLayoutLease?> EnsureExtractedAndAcquireLayoutAsync(string holderKind, string? commandName = null, CancellationToken cancellationToken = default) 617public Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default) 625public async Task<BundleLayoutLease?> EnsureExtractedAndAcquireLayoutAsync(string holderKind, string? commandName = null, CancellationToken cancellationToken = default)
DotNet\ProcessExecutionTests.cs (4)
232var waitTask = Assert.ThrowsAsync<OperationCanceledException>(() => execution.WaitForExitAsync(cts.Token)); 286private static async Task<FileInfo> CreateOutputScriptAsync(DirectoryInfo workspaceRoot, FileInfo outputFile) 315private static async Task<FileInfo> CreateDelayedOutputScriptAsync(DirectoryInfo workspaceRoot, FileInfo outputFile) 350private static async Task<FileInfo> CreateLongRunningScriptAsync(DirectoryInfo workspaceRoot)
DotNetSdkInstallerTests.cs (2)
65var checkTask = installer.CheckAsync(cancellationTokenSource.Token); 325private static async Task<ProcessStartInfo> CreateBlockingDotNetShimAsync(DirectoryInfo directory, string parentPidFile, string childPidFile)
Interaction\ConsoleInteractionServiceTests.cs (1)
2035public Task<ConsoleKeyInfo?> ReadKeyAsync(bool intercept, CancellationToken cancellationToken)
Mcp\ApiDocs\ApiDocsFetcherTests.cs (7)
112public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) 121public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) 144public Task<ApiReferenceItem[]?> GetIndexAsync(CancellationToken cancellationToken = default) 153public Task<string?> GetIndexSourceFingerprintAsync(CancellationToken cancellationToken = default) 162public Task<ApiReferenceItem[]?> GetMemberIndexAsync(CancellationToken cancellationToken = default) 171public Task<string?> GetMemberIndexSourceFingerprintAsync(CancellationToken cancellationToken = default) 180public Task<string[]?> GetIndexedMemberContainerIdsAsync(CancellationToken cancellationToken = default)
Mcp\ApiDocs\ApiDocsIndexServiceTests.cs (11)
590public Task<string?> FetchSitemapAsync(CancellationToken cancellationToken = default) 593public Task<string?> FetchPageAsync(string pageUrl, CancellationToken cancellationToken = default) 612public Task<string?> FetchSitemapAsync(CancellationToken cancellationToken = default) 615public Task<string?> FetchPageAsync(string pageUrl, CancellationToken cancellationToken = default) 630public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) 639public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) 662public Task<ApiReferenceItem[]?> GetIndexAsync(CancellationToken cancellationToken = default) 671public Task<string?> GetIndexSourceFingerprintAsync(CancellationToken cancellationToken = default) 680public Task<ApiReferenceItem[]?> GetMemberIndexAsync(CancellationToken cancellationToken = default) 689public Task<string?> GetMemberIndexSourceFingerprintAsync(CancellationToken cancellationToken = default) 698public Task<string[]?> GetIndexedMemberContainerIdsAsync(CancellationToken cancellationToken = default)
Mcp\Docs\DocsFetcherTests.cs (5)
398protected override Task<HttpResponseMessage> SendAsync( 417public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) 429public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) 448public Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default) 459public Task<string?> GetIndexSourceFingerprintAsync(CancellationToken cancellationToken = default)
Mcp\Docs\DocsIndexServiceTests.cs (13)
1380public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 1388public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 1398public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 1406public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 1691public async Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 1700public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) => Task.FromResult<string?>(null); 1702public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) => Task.FromResult<string?>(null); 1704public Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default) => Task.FromResult<LlmsDocument[]?>(null); 1706public Task<string?> GetIndexSourceFingerprintAsync(CancellationToken cancellationToken = default) => Task.FromResult<string?>(null); 1718public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) 1730public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) 1750public Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default) 1759public Task<string?> GetIndexSourceFingerprintAsync(CancellationToken cancellationToken = default)
Mcp\Docs\DocsSearchServiceTests.cs (6)
406public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 414public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 422public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) => Task.FromResult<string?>(null); 424public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) => Task.FromResult<string?>(null); 426public Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default) => Task.FromResult<LlmsDocument[]?>(null); 428public Task<string?> GetIndexSourceFingerprintAsync(CancellationToken cancellationToken = default) => Task.FromResult<string?>(null);
Mcp\TestMcpServerTransport.cs (1)
56public Task<McpClient> CreateClientAsync(ILoggerFactory? loggerFactory = null, CancellationToken cancellationToken = default)
Npm\AspireJsLauncherTests.cs (2)
378var stdoutTask = process.StandardOutput.ReadToEndAsync(); 379var stderrTask = process.StandardError.ReadToEndAsync();
NuGet\BundleNuGetServiceTests.cs (2)
361var firstRestoreTask = service.RestorePackagesAsync(packageList, workingDirectory: appHostDirectory.FullName); 364var secondRestoreTask = service.RestorePackagesAsync(packageList, workingDirectory: appHostDirectory.FullName);
NuGet\NuGetPackagePrefetcherTests.cs (1)
547protected override Task<CommandResult> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Packaging\NuGetConfigMergerSnapshotTests.cs (1)
32private static async Task<FileInfo> WriteConfigAsync(DirectoryInfo dir, string content)
Packaging\NuGetConfigMergerTests.cs (1)
22private static async Task<FileInfo> WriteConfigAsync(DirectoryInfo dir, string content)
Packaging\PackagingServiceTests.cs (5)
2323public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 2332public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 2335public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 2338public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 2341public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackageVersionsAsync(DirectoryInfo workingDirectory, string exactPackageId, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
ProfileCaptureServiceTests.cs (1)
548private static TestProcessExecution CreateStartedProcess(Func<ProcessInvocationOptions, CancellationToken, Task<int>> waitForExitAsync)
Projects\AppHostCandidateFinderTests.cs (1)
605private static async Task<FileInfo> WriteFileAsync(DirectoryInfo root, string relativePath)
Projects\AppHostInfoResolverTests.cs (2)
157var canceledWaiter = resolver.GetAppHostInfoAsync(projectFile, cancellationTokenSource.Token); 238public Task<AppHostInfoCacheEntry?> TryGetAsync(FileInfo projectFile, CancellationToken cancellationToken)
Projects\AppHostServerProjectTests.cs (2)
130var outputTask = process.StandardOutput.ReadToEndAsync(); 131var errorTask = process.StandardError.ReadToEndAsync();
Projects\AppHostServerSessionTests.cs (11)
195var completion = session.WaitForExitAsync(); 244var completion = session.WaitForExitAsync(); 288var completion = session.WaitForExitAsync(); 328var completion = session.WaitForExitAsync(); 360var completion = session.WaitForExitAsync(); 596public Task<AppHostServerPrepareResult> PrepareAsync( 604public async Task<AppHostServerRunResult> RunAsync( 640public Task<AppHostServerPrepareResult> PrepareAsync( 648public async Task<AppHostServerRunResult> RunAsync( 690public Task<AppHostServerPrepareResult> PrepareAsync( 698public Task<AppHostServerRunResult> RunAsync(
Projects\DotNetAppHostProjectTests.cs (4)
2263var runTask = project.RunAsync(new AppHostProjectContext 2887private async Task<int> AssertProjectAppHostFallsBackToDotNetRunAsync( 4613public Func<FileInfo, CancellationToken, Task<AppHostProjectInfo>>? GetAppHostInfoAsyncCallback { get; init; } 4617public Task<AppHostProjectInfo> GetAppHostInfoAsync(FileInfo projectFile, CancellationToken cancellationToken)
Projects\ExtensionGuestLauncherTests.cs (10)
203public Task<bool> TryDisplayCommandFailureAsync(string? errorMessage, string cliLogFilePath, string? appHostCliLogFilePath, CancellationToken cancellationToken) => throw new NotImplementedException(); 227public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) => throw new NotImplementedException(); 228public Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) => throw new NotImplementedException(); 230public Task<string> PromptForStringAsync(string promptText, Func<string, Spectre.Console.ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 231public Task<string> PromptForFilePathAsync(string promptText, Func<string, Spectre.Console.ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 232public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull => throw new NotImplementedException(); 233public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull => throw new NotImplementedException(); 240public Task<bool> PromptConfirmAsync(string promptText, PromptBinding<bool>? binding = null, CancellationToken cancellationToken = default) => throw new NotImplementedException();
Projects\GuestAppHostProjectTests.cs (2)
1236var runTask = project.RunAsync(context, cancellationSource.Token); 1823public Task<bool> RequestProcessTreeGracefulShutdownAsync(int pid, DateTimeOffset? startTime, bool includeStartTimeForDcp, CancellationToken cancellationToken)
Projects\GuestRuntimeTests.cs (2)
1099var launchTask = launcher.LaunchAsync( 1688public async Task<(int ExitCode, OutputCollector? Output)> LaunchAsync(
Projects\JavaAppHostToolchainResolverTests.cs (3)
627private static async Task<(int ExitCode, string Output)> RunCommandAsync( 651var standardOutput = process.StandardOutput.ReadToEndAsync(); 652var standardError = process.StandardError.ReadToEndAsync();
Projects\PrebuiltAppHostServerTests.cs (6)
1338private static async Task<TemporaryNuGetConfig?> InvokeTryCreateTemporaryNuGetConfigAsync( 1348var task = (Task<TemporaryNuGetConfig?>)method.Invoke(server, [requestedChannel, packageSourceOverride, CancellationToken.None])!; 1352private static async Task<IReadOnlyList<string>?> InvokeGetNuGetSourcesAsync( 1362var task = (Task<IEnumerable<string>?>)method.Invoke(server, [requestedChannel, packageSourceOverride, CancellationToken.None])!;
Projects\ProcessGuestLauncherTests.cs (7)
63var launchTask = launcher.LaunchAsync( 121var launchTask = launcher.LaunchAsync( 174var launchTask = launcher.LaunchAsync( 228var launchTask = launcher.LaunchAsync( 288var launchTask = launcher.LaunchAsync( 326private static async Task<(string Command, string[] Args)> GetProcessTreeCommandAsync(DirectoryInfo workspaceRoot, FileInfo descendantPidFile) 363private static async Task<int> WaitForPidFileAsync(FileInfo pidFile)
Projects\ProjectLocatorTests.cs (21)
37private static async Task<FileInfo> CreateSingleFileAppHostAsync(DirectoryInfo directory) 2168public Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 2174public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 2179public Task<Dictionary<string, string>> GetLocalConfigurationAsync(CancellationToken cancellationToken = default) 2184public Task<Dictionary<string, string>> GetGlobalConfigurationAsync(CancellationToken cancellationToken = default) 2189public Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default) 2195public Task<string?> GetConfigurationFromDirectoryAsync(string key, DirectoryInfo startDirectory, bool continueSearchWhenKeyMissing = false, CancellationToken cancellationToken = default) 2210public Task<IEnumerable<LanguageInfo>> GetAvailableLanguagesAsync(CancellationToken cancellationToken = default) 2213public Task<string?> GetPackageForLanguageAsync(LanguageId languageId, CancellationToken cancellationToken = default) 2216public Task<LanguageId?> DetectLanguageAsync(DirectoryInfo directory, CancellationToken cancellationToken = default) 2219public Task<LanguageId?> DetectLanguageRecursiveAsync(DirectoryInfo directory, CancellationToken cancellationToken = default) 2263public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken) 2272public Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) 2275public Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) 2278public Task<IReadOnlyList<(string PackageId, string Version)>> GetPackageReferencesAsync(FileInfo appHostFile, CancellationToken cancellationToken) 2281public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 2284public Task<string?> GetAspireHostingVersionAsync(FileInfo appHostFile, CancellationToken cancellationToken) 2287public Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) 2290public Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) 2293public Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 2296public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken)
Projects\ProjectUpdaterTests.cs (1)
1669private static async Task<(FileInfo AppHostProjectFile, DirectoryInfo AppHostFolder)> SetupNuGetConfigTestProject(TemporaryWorkspace workspace)
Projects\RunningInstanceManagerTests.cs (2)
134public Task<AppHostInformation> GetAppHostInformationAsync(CancellationToken cancellationToken = default) 145public Task<GetCapabilitiesResponse> GetCapabilitiesAsync(GetCapabilitiesRequest? request = null, CancellationToken cancellationToken = default)
Scaffolding\ChannelReseedTests.cs (2)
139public Task<AppHostServerPrepareResult> PrepareAsync( 150public Task<AppHostServerRunResult> RunAsync(
Telemetry\AspireCliTelemetryTests.cs (1)
562var resultTask = fixture.Telemetry.GetInternalMicrosoftResultAsync(timeoutSource, timeProvider);
Telemetry\InternalMicrosoftDetectorTests.cs (9)
99var detectionTask = detector.IsInternalMicrosoftMachineAsync(cancellationSource.Token); 268var detectionTask = detector.IsInternalMicrosoftMachineAsync(); 988var stdoutTask = process.StandardOutput.ReadToEndAsync(timeout.Token); 989var stderrTask = process.StandardError.ReadToEndAsync(timeout.Token); 1630var checkTask = detector.CheckCopilotCliAsync(safetyTimeout.Token); 1856public Task<bool> StartAsync(CancellationToken cancellationToken) 1859public Task<int> WaitForExitAsync(CancellationToken cancellationToken) 1869private sealed class TestGitHubHttpMessageHandler(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> sendAsync) : HttpMessageHandler 1882protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Telemetry\TelemetryConfigurationTests.cs (1)
36private static async Task<IHost> BuildHostAsync(Dictionary<string, string?>? config = null)
Telemetry\TelemetryFixture.cs (6)
128public Func<Task<string?>>? GetDeviceIdCallback { get; set; } 129public Func<Task<string>>? GetMacAddressHashCallback { get; set; } 131public Task<string?> GetOrCreateDeviceId() => GetDeviceIdCallback?.Invoke() ?? Task.FromResult(DeviceId); 132public Task<string> GetMacAddressHash() => GetMacAddressHashCallback?.Invoke() ?? Task.FromResult(MacAddressHash); 166public Func<CancellationToken, Task<InternalMicrosoftDetectionResult>>? DetectionCallback { get; set; } 169public Task<InternalMicrosoftDetectionResult> IsInternalMicrosoftMachineAsync(CancellationToken cancellationToken = default)
Telemetry\TestTelemetryHelper.cs (3)
61public Task<string?> GetOrCreateDeviceId() => Task.FromResult<string?>("test-device-id"); 62public Task<string> GetMacAddressHash() => Task.FromResult("test-mac-hash"); 77public Task<InternalMicrosoftDetectionResult> IsInternalMicrosoftMachineAsync(CancellationToken cancellationToken = default)
Templating\DotNetTemplateFactoryTests.cs (30)
376public Task<T> PromptForSelectionAsync<T>(string prompt, IEnumerable<T> choices, Func<T, string> displaySelector, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 379public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 382public Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 385public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 388public Task<bool> PromptConfirmAsync(string prompt, PromptBinding<bool>? binding = null, CancellationToken cancellationToken = default) 391public Task<TResult> ShowStatusAsync<TResult>(string message, Func<Task<TResult>> work, KnownEmoji? emoji = null, bool allowMarkup = false) 394public Task<TResult> ShowDynamicStatusAsync<TResult>(string initialStatusText, Func<Action<string>, Task<TResult>> action, KnownEmoji? emoji = null) 423public Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, ProcessInvocationOptions options, CancellationToken cancellationToken) 426public Task<int> NewProjectAsync(string templateName, string projectName, string outputPath, string[] extraArgs, ProcessInvocationOptions? options, CancellationToken cancellationToken) 429public Task<int> RestoreAsync(FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 432public Task<int> BuildAsync(FileInfo projectFile, bool noRestore, ProcessInvocationOptions options, CancellationToken cancellationToken) 435public Task<int> BuildAsync(FileInfo projectFile, bool noRestore, IDictionary<string, string>? env, ProcessInvocationOptions options, CancellationToken cancellationToken) 438public Task<int> AddPackageAsync(FileInfo projectFile, string packageName, string version, string? packageSourceUrl, bool noRestore, ProcessInvocationOptions options, CancellationToken cancellationToken) 441public Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 444public Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 447public Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProjectFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 450public Task<(int ExitCode, NuGetPackageCli[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool exactMatch, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, ProcessInvocationOptions options, CancellationToken cancellationToken) 453public Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 456public Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, string[] targets, ProcessInvocationOptions options, CancellationToken cancellationToken) 459public Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, ProcessInvocationOptions options, CancellationToken cancellationToken) 462public Task<int> RunAppHostCommandAsync(FileInfo projectFile, string command, DirectoryInfo workingDirectory, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, ProcessInvocationOptions options, CancellationToken cancellationToken) 465public Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, ProcessInvocationOptions options, CancellationToken cancellationToken) 468public Task<int> InitUserSecretsAsync(FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 474public Task<EnsureCertificatesTrustedResult> EnsureCertificatesTrustedAsync(CancellationToken cancellationToken) 486public Task<string> PromptForProjectNameAsync(string defaultName, ParseResult parseResult, CancellationToken cancellationToken) 489public Task<string> PromptForOutputPath(string defaultPath, ParseResult parseResult, Func<string, ValidationResult>? validator = null, Func<string, string>? outputPathResolver = null, CancellationToken cancellationToken = default) 492public Task<(Aspire.Shared.NuGetPackageCli Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(Aspire.Shared.NuGetPackageCli Package, PackageChannel Channel)> packages, CancellationToken cancellationToken) 495public Task<ITemplate> PromptForTemplateAsync(ITemplate[] templates, CancellationToken cancellationToken)
Templating\JavaStarterScaffoldTests.cs (1)
120private async Task<ScaffoldedTemplate> ScaffoldJavaStarterAsync()
Templating\TemplateNuGetConfigServiceTests.cs (1)
1295public Task<(Aspire.Shared.NuGetPackageCli Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(
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\CallbackNuGetPackageCache.cs (6)
10Func<DirectoryInfo, bool, FileInfo?, CancellationToken, Task<IEnumerable<NuGetPackage>>> getTemplatePackagesAsyncCallback) : INuGetPackageCache 12public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 17public Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 20public Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 23public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 26public Task<IEnumerable<NuGetPackage>> GetPackageVersionsAsync(DirectoryInfo workingDirectory, string exactPackageId, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
TestServices\FakeAppHostServerSession.cs (12)
29public Func<CancellationToken, Task<IAppHostRpcClient>>? GetRpcClientAsyncCallback { get; init; } 64public Task<int> WaitForExitAsync() => _exit.Task; 66public Task<IAppHostRpcClient> GetRpcClientAsync(CancellationToken cancellationToken) 127public Func<string, string, string?, CancellationToken, Task<Dictionary<string, string>>>? ScaffoldAppHostAsyncCallback { get; init; } 129public virtual Task<RuntimeSpec> GetRuntimeSpecAsync(string languageId, CancellationToken cancellationToken) 139public virtual Task<Dictionary<string, string>> ScaffoldAppHostAsync(string languageId, string targetPath, string? projectName, CancellationToken cancellationToken) 144public virtual Task<Dictionary<string, string>> GenerateCodeAsync(string languageId, CancellationToken cancellationToken) 147public virtual Task<Dictionary<string, string>> GenerateCodeForAssemblyAsync(string languageId, string assemblyName, CancellationToken cancellationToken) 150public virtual Task<CapabilitiesInfo> GetCapabilitiesAsync(CancellationToken cancellationToken) 153public virtual Task<CapabilitiesInfo> GetCapabilitiesForAssembliesAsync(IReadOnlyList<string> assemblyNames, CancellationToken cancellationToken) 156public virtual Task<JsonElement> ExportApiAsync(string languageId, string packageName, string packageVersion, CancellationToken cancellationToken) 159public virtual Task<T> InvokeAsync<T>(string methodName, object?[] parameters, CancellationToken cancellationToken)
TestServices\FakeFailingAppHostServerProject.cs (2)
24public Task<AppHostServerPrepareResult> PrepareAsync( 32public Task<AppHostServerRunResult> RunAsync(
TestServices\FakeInstallationDiscovery.cs (2)
20public Func<CancellationToken, Task<IReadOnlyList<InstallationInfo>>>? DiscoverAllAsyncCallback { get; init; } 31public Task<IReadOnlyList<InstallationInfo>> DiscoverAllAsync(CancellationToken cancellationToken)
TestServices\FakeNuGetPackageCache.cs (10)
11public Func<DirectoryInfo, bool, FileInfo?, CancellationToken, Task<IEnumerable<NuGetPackage>>>? GetTemplatePackagesAsyncCallback { get; set; } 12public Func<DirectoryInfo, bool, FileInfo?, CancellationToken, Task<IEnumerable<NuGetPackage>>>? GetIntegrationPackagesAsyncCallback { get; set; } 13public Func<DirectoryInfo, bool, FileInfo?, CancellationToken, Task<IEnumerable<NuGetPackage>>>? GetCliPackagesAsyncCallback { get; set; } 14public Func<DirectoryInfo, string, bool, FileInfo?, bool, CancellationToken, Task<IEnumerable<NuGetPackage>>>? GetPackageVersionsAsyncCallback { get; set; } 16public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 20public Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 24public Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 28public Func<DirectoryInfo, string, Func<string, bool>?, bool, FileInfo?, bool, CancellationToken, Task<IEnumerable<NuGetPackage>>>? GetPackagesAsyncCallback { get; set; } 30public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 51public Task<IEnumerable<NuGetPackage>> GetPackageVersionsAsync(DirectoryInfo workingDirectory, string exactPackageId, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
TestServices\FakePeerInstallProbe.cs (1)
48public Task<PeerProbeResult> ProbeAsync(string binaryPath, CancellationToken cancellationToken)
TestServices\FakePlaywrightServices.cs (7)
21public Task<NpmPackageInfo?> ResolvePackageAsync(string packageName, string versionRange, CancellationToken cancellationToken) 24public Task<string?> PackAsync(string packageName, string version, string outputDirectory, CancellationToken cancellationToken) 27public Task<bool> InstallGlobalAsync(string tarballPath, CancellationToken cancellationToken) 36public Task<ProvenanceVerificationResult> VerifyProvenanceAsync(string packageName, string version, string expectedSourceRepository, string expectedWorkflowPath, string expectedBuildType, Func<WorkflowRefInfo, bool>? validateWorkflowRef, string? sriIntegrity, CancellationToken cancellationToken) 67public async Task<AspireSkillsInstallResult> InstallAsync(CancellationToken cancellationToken) 207public Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken) 210public Task<bool> InstallSkillsAsync(string workingDirectory, CancellationToken cancellationToken)
TestServices\FakeSucceedingAppHostServerProject.cs (2)
21public Task<AppHostServerPrepareResult> PrepareAsync( 29public Task<AppHostServerRunResult> RunAsync(
TestServices\NoProjectFileProjectLocator.cs (5)
10public Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 15public Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 20public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 25public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 30public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null);
TestServices\NullDiskCache.cs (2)
14public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) 32public Task<AppHostInfoCacheEntry?> TryGetAsync(FileInfo projectFile, CancellationToken cancellationToken)
TestServices\ProcessTestHelpers.cs (1)
10public static async Task<int> WaitForProcessIdAsync(string pidFile, CancellationToken cancellationToken)
TestServices\RecordingGracefulSignaler.cs (3)
11private readonly Func<int, Task<bool>>? _onSignal; 14public RecordingGracefulSignaler(Func<int, Task<bool>>? onSignal = null) 30public Task<bool> RequestProcessTreeGracefulShutdownAsync(
TestServices\TestAgentEnvironmentDetector.cs (1)
10public Task<AgentEnvironmentApplicator[]> DetectAsync(
TestServices\TestApiDocsFetcher.cs (2)
13public Task<string?> FetchSitemapAsync(CancellationToken cancellationToken = default) 18public Task<string?> FetchPageAsync(string pageUrl, CancellationToken cancellationToken = default)
TestServices\TestAppHostAuxiliaryBackchannel.cs (15)
57public Func<CancellationToken, Task<WaitForAppHostReadyResponse?>>? WaitForAppHostReadyHandler { get; set; } 72public Func<string, string, IReadOnlyDictionary<string, JsonElement>?, CancellationToken, Task<CallToolResult>>? CallResourceMcpToolHandler { get; set; } 78public Func<CancellationToken, Task<List<ResourceSnapshot>>>? GetResourceSnapshotsHandler { get; set; } 119public Task<DashboardUrlsState?> GetDashboardUrlsAsync(CancellationToken cancellationToken = default) 124public Task<GetAppHostInfoResponse?> GetAppHostInfoV2Async(CancellationToken cancellationToken = default) 149public Task<WaitForAppHostReadyResponse?> WaitForAppHostReadyAsync(CancellationToken cancellationToken = default) 164public Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(bool includeHidden, CancellationToken cancellationToken = default) 283public Task<bool> StopAppHostAsync(CancellationToken cancellationToken = default) 299public Task<ExecuteResourceCommandResponse> ExecuteResourceCommandAsync( 316public Func<string, string, int, CancellationToken, Task<WaitForResourceResponse>>? WaitForResourceHandler { get; set; } 318public Task<WaitForResourceResponse> WaitForResourceAsync( 332public Task<CallToolResult> CallResourceMcpToolAsync( 354public Task<GetDashboardInfoResponse?> GetDashboardInfoV2Async(CancellationToken cancellationToken = default) 364public Task<GetTerminalInfoResponse> GetTerminalInfoAsync(string resourceName, CancellationToken cancellationToken = default) 375public Task<ListTerminalsResponse> ListTerminalsAsync(CancellationToken cancellationToken = default)
TestServices\TestAppHostCliBackchannel.cs (8)
16public Func<CancellationToken, Task<DashboardUrlsState>>? GetDashboardUrlsAsyncCallback { get; set; } 32public Func<CancellationToken, Task<string[]>>? GetCapabilitiesAsyncCallback { get; set; } 35public Func<string?, CancellationToken, Task<GetPipelineStepsResponse>>? GetPipelineStepsAsyncCallback { get; set; } 56public Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) 229public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken) 264public async Task<GetPipelineStepsResponse> GetPipelineStepsAsync(string? step, CancellationToken cancellationToken) 282public Func<string, string, CancellationToken, Task<UploadFileResponse>>? UploadFileAsyncCallback { get; set; } 284public async Task<UploadFileResponse> UploadFileAsync(string filePath, string fileName, int interactionId, string inputName, CancellationToken cancellationToken)
TestServices\TestAppHostProjectFactory.cs (15)
30public Func<FileInfo, CancellationToken, Task<string?>>? GetAspireHostingVersionAsyncCallback { get; set; } 35public Func<FileInfo, CancellationToken, Task<AppHostValidationResult>>? ValidateAppHostAsyncCallback { get; set; } 37public Func<AppHostProjectContext, CancellationToken, Task<int>>? RunAsyncCallback { get; set; } 39public Func<AddPackageContext, CancellationToken, Task<bool>>? AddPackageAsyncCallback { get; set; } 41public Func<UpdatePackagesContext, CancellationToken, Task<UpdatePackagesResult>>? UpdatePackagesAsyncCallback { get; set; } 165public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken) 190public Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) 195public Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) 198public Task<IReadOnlyList<(string PackageId, string Version)>> GetPackageReferencesAsync(FileInfo appHostFile, CancellationToken cancellationToken) 201public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 227public Task<string?> GetAspireHostingVersionAsync(FileInfo appHostFile, CancellationToken cancellationToken) 234public Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) 239public Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) 244public Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 247public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken)
TestServices\TestAppHostServerProjectFactory.cs (3)
10public Func<string, CancellationToken, Task<IAppHostServerProject>>? CreateAsyncCallback { get; set; } 14public Task<IAppHostServerProject> CreateAsync(string appPath, CancellationToken cancellationToken = default) 17public Task<IAppHostServerProject> CreateAsync(string appPath, string? restoreRootConfigDirectory, CancellationToken cancellationToken)
TestServices\TestAppHostStopper.cs (4)
38public Func<int, DateTimeOffset?, bool, CancellationToken, Task<bool>>? ProcessTreeStopAsyncCallback { get; set; } 40public Task<bool> StopProcessTreeAsync( 51public Task<bool> StopAppHostAsync( 53Func<CancellationToken, Task<bool>>? requestRpcStopAsync,
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\TestCliUpdateNotifier.cs (2)
14public Func<DirectoryInfo, CancellationToken, Task<CliVersionStatus>>? GetVersionStatusAsyncCallback { get; set; } 30public Task<CliVersionStatus> GetVersionStatusAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken)
TestServices\TestConfigurationService.cs (6)
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) 50public Task<string?> GetConfigurationFromDirectoryAsync(string key, DirectoryInfo startDirectory, bool continueSearchWhenKeyMissing = false, CancellationToken cancellationToken = default)
TestServices\TestDcpConnectionChecker.cs (2)
10public Func<string, bool, CancellationToken, Task<EnvironmentCheckResult>>? TestConnectionAsyncCallback { get; set; } 12public Task<EnvironmentCheckResult> TestConnectionAsync(string dcpDirectory, bool useDeveloperCertificate, CancellationToken cancellationToken)
TestServices\TestDocsFetcher.cs (1)
13public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default)
TestServices\TestDotNetCliRunner.cs (20)
21public Func<FileInfo, string[], string[], string[], ProcessInvocationOptions, CancellationToken, Task<(int ExitCode, JsonDocument? Output)>>? GetProjectItemsAndPropertiesAsyncCallbackWithTargetsAsync { get; set; } 23public Func<FileInfo, string[], string[], ProcessInvocationOptions, CancellationToken, Task<(int ExitCode, JsonDocument? Output)>>? GetProjectItemsAndPropertiesAsyncCallbackAsync { get; set; } 28public Func<FileInfo, bool, bool, bool, string[], IDictionary<string, string>?, TaskCompletionSource<IAppHostCliBackchannel>?, ProcessInvocationOptions, CancellationToken, Task<int>>? RunAsyncCallback { get; set; } 29public Func<FileInfo, string, DirectoryInfo, string[], IDictionary<string, string>?, TaskCompletionSource<IAppHostCliBackchannel>?, ProcessInvocationOptions, CancellationToken, Task<int>>? RunAppHostCommandAsyncCallback { get; set; } 35public Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, bool noRestore, ProcessInvocationOptions options, CancellationToken cancellationToken) 42public Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 49public Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, ProcessInvocationOptions options, CancellationToken cancellationToken) 52public Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, IDictionary<string, string>? env, ProcessInvocationOptions options, CancellationToken cancellationToken) 64public Task<int> RestoreAsync(FileInfo projectFilePath, ProcessInvocationOptions options, CancellationToken cancellationToken) 71public Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 80public Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, ProcessInvocationOptions options, CancellationToken cancellationToken) 96public Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, string[] targets, ProcessInvocationOptions options, CancellationToken cancellationToken) 154public Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, ProcessInvocationOptions options, CancellationToken cancellationToken) 161public Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, ProcessInvocationOptions options, CancellationToken cancellationToken) 170public async Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, ProcessInvocationOptions options, CancellationToken cancellationToken) 185public Task<int> RunAppHostCommandAsync(FileInfo projectFile, string command, DirectoryInfo workingDirectory, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, ProcessInvocationOptions options, CancellationToken cancellationToken) 197public Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool exactMatch, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, ProcessInvocationOptions options, CancellationToken cancellationToken) 204public Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, ProcessInvocationOptions options, CancellationToken cancellationToken) 211public Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProject, ProcessInvocationOptions options, CancellationToken cancellationToken) 218public Task<int> InitUserSecretsAsync(FileInfo projectFile, ProcessInvocationOptions options, CancellationToken cancellationToken)
TestServices\TestDotNetSdkInstaller.cs (1)
12public Task<(bool Success, string? HighestDetectedVersion, string MinimumRequiredVersion)> CheckAsync(CancellationToken cancellationToken = default)
TestServices\TestEnvironmentCheck.cs (2)
10Func<CancellationToken, Task<IReadOnlyList<EnvironmentCheckResult>>> checkAsync) : IEnvironmentCheck 14public Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
TestServices\TestExtensionBackchannel.cs (14)
53public Func<string, bool, Task<bool>>? ConfirmAsyncCallback { get; set; } 56public Func<string, string?, Func<string, ValidationResult>?, bool, Task<string>>? PromptForStringAsyncCallback { get; set; } 59public Func<string, Func<string, ValidationResult>?, bool, Task<string>>? PromptForSecretStringAsyncCallback { get; set; } 62public Func<string, string?, bool, Task<string?>>? PromptForFilePathAsyncCallback { get; set; } 71public Func<CancellationToken, Task<string[]>>? GetCapabilitiesAsyncCallback { get; set; } 74public Func<string, CancellationToken, Task<bool>>? HasCapabilityAsyncCallback { get; set; } 172public Task<string?> PromptForFilePathAsync(string promptText, string? defaultValue, bool directory, CancellationToken cancellationToken) 180public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull 192public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull 204public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default) 212public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool required = false, CancellationToken cancellationToken = default) 220public Task<string> PromptForSecretStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool required = false, CancellationToken cancellationToken = default) 244public Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken) 252public async Task<bool> HasCapabilityAsync(string capability, CancellationToken cancellationToken)
TestServices\TestExtensionInteractionService.cs (12)
31public Func<string?, string, string?, CancellationToken, Task<bool>>? TryDisplayCommandFailureAsyncCallback { get; set; } 33public Func<string, Func<string, ValidationResult>?, bool, bool, PromptBinding<string?>?, CancellationToken, Task<string>>? PromptForStringCallback { get; set; } 51public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) 56public Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) 66public Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 76public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 81public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 102public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 170public Task<bool> TryDisplayCommandFailureAsync( 210public Task<bool> PromptConfirmAsync(string promptText, PromptBinding<bool>? binding = null, CancellationToken cancellationToken = default)
TestServices\TestGitRepository.cs (4)
10public Func<CancellationToken, Task<DirectoryInfo?>>? GetRootAsyncCallback { get; set; } 12public Func<DirectoryInfo, CancellationToken, Task<IReadOnlySet<string>?>>? GetIncludedFilesAsyncCallback { get; set; } 14public Task<DirectoryInfo?> GetRootAsync(CancellationToken cancellationToken) 19public Task<IReadOnlySet<string>?> GetIncludedFilesAsync(DirectoryInfo searchRoot, CancellationToken cancellationToken)
TestServices\TestInteractionService.cs (10)
77public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) 90public Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) 117public Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 130public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 143private Task<string> PromptForResponseAsync(Func<string, ValidationResult>? validator, PromptBinding<string?>? binding, CancellationToken cancellationToken) 168public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 209public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 287public Task<bool> PromptConfirmAsync(string promptText, PromptBinding<bool>? binding = null, CancellationToken cancellationToken = default)
TestServices\TestLanguageDiscovery.cs (4)
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) 61public Task<LanguageId?> DetectLanguageRecursiveAsync(DirectoryInfo directory, CancellationToken cancellationToken = default)
TestServices\TestLanguageService.cs (8)
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; } 14public Func<string?, bool, CancellationToken, Task<AppHostProjectSelection>>? GetOrPromptForProjectSelectionAsyncCallback { get; set; } 21public Task<IAppHostProject?> GetConfiguredProjectAsync(CancellationToken cancellationToken = default) 35public Task<IAppHostProject> PromptForProjectAsync(CancellationToken cancellationToken = default) 50public Task<IAppHostProject> GetOrPromptForProjectAsync(string? explicitLanguageId = null, bool saveLanguageSelection = true, CancellationToken cancellationToken = default) 65public async Task<AppHostProjectSelection> GetOrPromptForProjectSelectionAsync(string? explicitLanguageId = null, bool saveLanguageSelection = true, CancellationToken cancellationToken = default)
TestServices\TestMigration.cs (1)
26public Task<MigrationDescriptor?> DetectAsync(MigrationContext context, CancellationToken cancellationToken)
TestServices\TestNewCommandPrompter.cs (4)
22public override Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken) 31public override Task<string> PromptForProjectNameAsync(string defaultName, ParseResult parseResult, CancellationToken cancellationToken) 40public override Task<string> PromptForOutputPath(string path, ParseResult parseResult, Func<string, ValidationResult>? validator = null, Func<string, string>? outputPathResolver = null, CancellationToken cancellationToken = default) 61public override Task<(NuGetPackage Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(NuGetPackage Package, PackageChannel Channel)> candidatePackages, CancellationToken cancellationToken)
TestServices\TestPackagingService.cs (2)
11public Func<CancellationToken, Task<IEnumerable<PackageChannel>>>? GetChannelsAsyncCallback { get; set; } 22public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default, string? requestedChannelName = null)
TestServices\TestProcessExecutionFactory.cs (6)
47public Func<int, ProcessInvocationOptions, CancellationToken, Task<(int ExitCode, string? Stdout)>>? AsyncAttemptCallback { get; set; } 142private readonly Func<int, ProcessInvocationOptions, CancellationToken, Task<(int ExitCode, string? Stdout)>> _attemptCallback; 153Func<int, ProcessInvocationOptions, CancellationToken, Task<(int ExitCode, string? Stdout)>> attemptCallback, 198public Func<ProcessInvocationOptions, CancellationToken, Task<int>>? WaitForExitAsyncCallback { get; init; } 210public Task<bool> StartAsync(CancellationToken cancellationToken) 228public async Task<int> WaitForExitAsync(CancellationToken cancellationToken)
TestServices\TestProjectLocator.cs (13)
12public Func<FileInfo?, bool, CancellationToken, Task<FileInfo?>>? UseOrFindAppHostProjectFileAsyncCallback { get; set; } 14public Func<FileInfo?, MultipleAppHostProjectsFoundBehavior, bool, CancellationToken, Task<AppHostProjectSearchResult>>? UseOrFindAppHostProjectFileWithBehaviorAsyncCallback { get; set; } 16public Func<CancellationToken, Task<FileInfo?>>? GetAppHostFromSettingsAsyncCallback { get; set; } 18public Func<DirectoryInfo, AppHostDiscoveryScope, CancellationToken, Task<List<AppHostProjectCandidate>>>? FindAppHostProjectsAsyncCallback { get; set; } 22public Func<DirectoryInfo, AppHostDiscoveryScope, CancellationToken, Task<List<FileInfo>>>? FindAppHostProjectFilesAsyncCallback { get; set; } 24public Func<DirectoryInfo, AppHostDiscoveryScope, int?, CancellationToken, Task<List<FileInfo>>>? FindAppHostProjectFilesWithDepthAsyncCallback { get; set; } 26public async Task<List<AppHostProjectCandidate>> FindAppHostProjectsAsync( 62public async Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, CancellationToken cancellationToken) 72public async Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, AppHostDiscoveryScope scope, int? maxDepth, CancellationToken cancellationToken) 82public async Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 99public async Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 116public async Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) 127public async Task<FileInfo?> GetAppHostFromSettingsAsync(DirectoryInfo searchDirectory, bool searchParentDirectories, CancellationToken cancellationToken = default)
TestServices\TestScaffoldingService.cs (2)
10public Func<ScaffoldContext, CancellationToken, Task<bool>>? ScaffoldAsyncCallback { get; set; } 12public Task<bool> ScaffoldAsync(ScaffoldContext context, CancellationToken cancellationToken)
TestServices\TestSolutionLocator.cs (2)
10public required Func<DirectoryInfo, CancellationToken, Task<FileInfo?>> FindSolutionFileAsyncCallback { get; init; } 12public Task<FileInfo?> FindSolutionFileAsync(DirectoryInfo startDirectory, CancellationToken cancellationToken = default)
TestServices\TestTypeScriptStarterProjectFactory.cs (14)
9internal sealed class TestTypeScriptStarterProjectFactory(Func<DirectoryInfo, CancellationToken, string?, Task<bool>> buildAndGenerateSdkAsync) : IAppHostProjectFactory 44internal sealed class TestTypeScriptStarterProject(Func<DirectoryInfo, CancellationToken, string?, Task<bool>> buildAndGenerateSdkAsync) : IAppHostProject, IGuestAppHostSdkGenerator 50public Func<AddPackageContext, CancellationToken, Task<bool>>? AddPackageAsyncCallback { get; set; } 60public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken = default) 75public Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) 80public Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) 85public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 90public Task<string?> GetAspireHostingVersionAsync(FileInfo appHostFile, CancellationToken cancellationToken) 95public Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) 102public Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) 107public Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 112public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken) 117public Task<IReadOnlyList<(string PackageId, string Version)>> GetPackageReferencesAsync(FileInfo appHostFile, CancellationToken cancellationToken) 122public Task<bool> BuildAndGenerateSdkAsync(DirectoryInfo directory, string? packageSourceOverride = null, CancellationToken cancellationToken = default)
Utils\CliTestHelper.cs (4)
792public Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default) 795public Task<BundleLayoutLease?> EnsureExtractedAndAcquireLayoutAsync(string holderKind, string? commandName = null, CancellationToken cancellationToken = default) 829public Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default) 832public async Task<BundleLayoutLease?> EnsureExtractedAndAcquireLayoutAsync(string holderKind, string? commandName = null, CancellationToken cancellationToken = default)
Utils\EnvironmentCheckerTests.cs (1)
41var checkAllTask = checker.CheckAllAsync(TestContext.Current.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 (150)
Api\ApiAuthenticationHandler.cs (1)
31protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Api\TelemetryApiService.cs (4)
28public async Task<TelemetryApiResponse?> GetSpansAsync(string[]? resourceNames, string? traceId, bool? hasError, int? limit, CancellationToken cancellationToken, string? search = null) 81public async Task<TelemetryApiResponse?> GetTracesAsync(string[]? resourceNames, bool? hasError, int? limit, CancellationToken cancellationToken, string? search = null) 166public async Task<TelemetryApiResponse?> GetLogsAsync(string[]? resourceNames, string? traceId, string? severity, int? limit, CancellationToken cancellationToken, string? search = null) 518private async Task<List<ResourceKey>> WaitForResourceKeysAsync(string[]? resourceNames, CancellationToken cancellationToken)
artifacts\obj\Aspire.Dashboard\Debug\net8.0\DashboardServiceGrpc.cs (3)
136public virtual global::System.Threading.Tasks.Task<global::Aspire.DashboardService.Proto.V1.ApplicationInformationResponse> GetApplicationInformation(global::Aspire.DashboardService.Proto.V1.ApplicationInformationRequest request, grpc::ServerCallContext context) 154public virtual global::System.Threading.Tasks.Task<global::Aspire.DashboardService.Proto.V1.ResourceCommandResponse> ExecuteResourceCommand(global::Aspire.DashboardService.Proto.V1.ResourceCommandRequest request, grpc::ServerCallContext context) 166public virtual global::System.Threading.Tasks.Task<global::Aspire.DashboardService.Proto.V1.UploadFileResponse> UploadFile(grpc::IAsyncStreamReader<global::Aspire.DashboardService.Proto.V1.UploadFileChunk> requestStream, 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\Chart\ChartContainer.razor.cs (1)
252private async Task<(long UpdateVersion, OtlpInstrumentData? Instrument)> GetInstrumentAsync(bool useIncrementalCache, CancellationToken cancellationToken)
Components\Controls\TerminalView.razor.cs (1)
343public async Task<IReadOnlyList<TerminalSizePreset>> GetSizePresetsAsync()
Components\Controls\UserProfile.razor.cs (1)
29public required Task<AuthenticationState> AuthenticationState { get; set; }
Components\Dialogs\FilterDialog.razor.cs (1)
201private async Task<bool> UpdateParameterFieldValuesAsync()
Components\Dialogs\GenAIVisualizerDialog.razor.cs (1)
257private async Task<bool> TryUpdateViewedGenAISpanAsync(OtlpSpan newSpan)
Components\Dialogs\TextVisualizerDialog.razor.cs (1)
133public static async Task<DashboardDialogReference> OpenDialogAsync(OpenTextVisualizerDialogOptions options)
Components\Interactions\InteractionsProvider.cs (2)
54internal async Task<int> GetMessagesProcessedAsync() 158Func<DashboardDialogService, Task<DashboardDialogReference>> openDialog;
Components\Layout\MainLayout.razor.cs (2)
214static async Task<bool> ShouldSkipMessageAsync(ILocalStorage localStorage, string storageKey) 356private async Task<bool> CloseOpenPageDialogForReplacementAsync(string dialogId)
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; }
Components\Pages\StructuredLogs.razor.cs (1)
597public async Task<bool> IsSelectedLogEntryExcludedByFiltersAsync(
Components\Pages\TraceDetail.razor.cs (3)
648async Task<HashSet<string>> GetMatchingSpanIdsAsync(List<TelemetryFilter> filters, string[]? textFragments) 692private Task<List<string>> GetTraceSpanPropertyKeysAsync(CancellationToken cancellationToken) 712private Task<Dictionary<string, int>> GetTraceSpanFieldValuesAsync(string attributeName, CancellationToken cancellationToken)
DashboardWebApplication.cs (1)
1035public async Task<int> RunAsync(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)
32private async Task<List<LogEntry>> FetchLogEntriesAsync(string resourceName, DateTime? filterDate, CancellationToken cancellationToken) 62public async Task<Dictionary<string, List<LogEntry>>> FetchLogEntriesAsync(HashSet<string> resourceNames, CancellationToken cancellationToken)
Model\DashboardDialogParameters.cs (2)
44public sealed class DashboardDialogReference(string? id, Task<DialogResult> result) 50public Task<DialogResult> Result => result;
Model\DashboardDialogService.cs (9)
40public Task<DashboardDialogReference> ShowDialogAsync<TDialog>(object content, DialogParameters parameters) 53public Task<DashboardDialogReference> ShowDialogAsync<TDialog>(DialogParameters parameters) 67public Task<DashboardDialogReference> ShowPanelAsync<TDialog>(object content, DialogParameters parameters) 80public Task<DashboardDialogReference> ShowPanelAsync<TDialog>(DialogParameters parameters) 91public async Task<DialogResult> ShowConfirmationAsync(string message) 107private async Task<DashboardDialogReference> ShowAsync<TDialog>(object? content, DialogParameters parameters, bool drawer) 115var resultTask = drawer 185Task<DialogResult> resultTask, 215static Task<IDialogInstance?> GetInstanceAsync(DashboardDialogReference reference)
Model\DashboardMessageBarService.cs (8)
30Task<MessageBarResult> result, 35public Task<MessageBarResult> Result => result; 45public async Task<DashboardMessageBarReference> ShowAsync( 68var resultTask = notificationService.ShowMessageBarAsync<DashboardMessageBar>(options); 80internal static async Task<IMessageBarInstance> WaitForVisibleAsync( 81Task<IMessageBarInstance> openedTask, 82Task<MessageBarResult> resultTask) 94private static async Task InvokeOnCloseAsync(Task<MessageBarResult> resultTask, Func<MessageBarResult, Task> onClose)
Model\ExportHelpers.cs (2)
24public static async Task<ExportResult> GetSpanAsJsonAsync(OtlpSpan span, ITelemetryRepository telemetryRepository, CancellationToken cancellationToken) 47public static async Task<ExportResult> GetTraceAsJsonAsync(OtlpTrace trace, ITelemetryRepository telemetryRepository, CancellationToken cancellationToken)
Model\FilterDialogViewModel.cs (2)
12public required Func<CancellationToken, Task<List<string>>> GetPropertyKeysAsync { get; init; } 13public required Func<string, CancellationToken, Task<Dictionary<string, int>>> GetFieldValuesAsync { get; init; }
Model\GenAI\GenAIVisualizerDialogViewModel.cs (2)
50public static async Task<GenAIVisualizerDialogViewModel> CreateAsync( 597private static async Task<List<OtlpLogEntry>> GetSpanLogEntriesAsync(ITelemetryRepository telemetryRepository, OtlpSpan span, CancellationToken cancellationToken)
Model\NavigationDialogService.cs (1)
19public override async Task<DialogResult> ShowDialogAsync(
Model\StructuredLogsViewModel.cs (1)
79public async Task<PagedResult<LogSummary>> GetLogsAsync(CancellationToken cancellationToken)
Model\TelemetryExportService.cs (1)
48public 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\TracesViewModel.cs (1)
77public async Task<PagedResult<TraceSummary>> GetTracesAsync(CancellationToken cancellationToken)
Model\ValidateTokenMiddleware.cs (1)
84public 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>(
Otlp\OtlpLogsService.cs (1)
23public async Task<ExportLogsServiceResponse> ExportAsync(ExportLogsServiceRequest request)
Otlp\OtlpMetricsService.cs (1)
23public async Task<ExportMetricsServiceResponse> ExportAsync(ExportMetricsServiceRequest request)
Otlp\OtlpTraceService.cs (1)
23public async Task<ExportTraceServiceResponse> ExportAsync(ExportTraceServiceRequest request)
Otlp\Storage\ITelemetryRepository.cs (12)
37Task<PagedResult<OtlpLogEntry>> GetLogsAsync(GetLogsContext context, CancellationToken cancellationToken); 38Task<PagedResult<LogSummary>> GetLogSummariesAsync(GetLogsContext context, CancellationToken cancellationToken); 40Task<List<OtlpLogEntry>> GetLogsForSpanAsync(string traceId, string spanId, CancellationToken cancellationToken); 41Task<List<OtlpLogEntry>> GetLogsForTraceAsync(string traceId, CancellationToken cancellationToken); 42Task<List<string>> GetLogPropertyKeysAsync(ResourceKey? resourceKey, CancellationToken cancellationToken); 43Task<List<string>> GetTracePropertyKeysAsync(ResourceKey? resourceKey, CancellationToken cancellationToken); 44Task<GetTracesResponse> GetTracesAsync(GetTracesRequest context, CancellationToken cancellationToken); 45Task<GetTraceSummariesResponse> GetTraceSummariesAsync(GetTracesRequest context, CancellationToken cancellationToken); 46Task<GetSpansResponse> GetSpansAsync(GetSpansRequest context, CancellationToken cancellationToken); 47Task<Dictionary<string, int>> GetTraceFieldValuesAsync(string attributeName, CancellationToken cancellationToken); 48Task<Dictionary<string, int>> GetLogsFieldValuesAsync(string attributeName, CancellationToken cancellationToken); 64Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken);
Otlp\Storage\SqliteTelemetryRepository.cs (13)
160internal static Task<T> RunReadAsync<T>(Func<CancellationToken, T> read, CancellationToken cancellationToken) => 176public Task<PagedResult<OtlpLogEntry>> GetLogsAsync(GetLogsContext context, CancellationToken cancellationToken) => 178public Task<PagedResult<LogSummary>> GetLogSummariesAsync(GetLogsContext context, CancellationToken cancellationToken) => 181public async Task<List<OtlpLogEntry>> GetLogsForSpanAsync(string traceId, string spanId, CancellationToken cancellationToken) 196public async Task<List<OtlpLogEntry>> GetLogsForTraceAsync(string traceId, CancellationToken cancellationToken) 210public Task<List<string>> GetLogPropertyKeysAsync(ResourceKey? resourceKey, CancellationToken cancellationToken) => 212public Task<List<string>> GetTracePropertyKeysAsync(ResourceKey? resourceKey, CancellationToken cancellationToken) => 214public Task<GetTracesResponse> GetTracesAsync(GetTracesRequest context, CancellationToken cancellationToken) => 216public Task<GetTraceSummariesResponse> GetTraceSummariesAsync(GetTracesRequest context, CancellationToken cancellationToken) => 218public Task<GetSpansResponse> GetSpansAsync(GetSpansRequest context, CancellationToken cancellationToken) => 220public Task<Dictionary<string, int>> GetTraceFieldValuesAsync(string attributeName, CancellationToken cancellationToken) => 222public Task<Dictionary<string, int>> GetLogsFieldValuesAsync(string attributeName, CancellationToken cancellationToken) => 231public Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) =>
Otlp\Storage\SqliteTelemetryRepository.Logs.cs (1)
24private async Task<List<OtlpLogEntry>> AddLogsToDatabaseAsync(AddContext context, RepeatedField<ResourceLogs> resourceLogs)
Otlp\Storage\SqliteTelemetryRepository.Traces.Writes.cs (1)
25private async Task<List<OtlpSpan>> AddTracesToDatabaseAsync(AddContext context, RepeatedField<ResourceSpans> resourceSpans)
ServiceClient\DashboardClient.cs (8)
383private async Task<bool> ConnectWithRetryAsync(CancellationToken cancellationToken) 465private async Task WatchWithRecoveryAsync(Func<RetryContext, CancellationToken, Task<RetryResult>> action, string actionName, CancellationToken cancellationToken) 564private async Task<RetryResult> WatchResourcesAsync(RetryContext retryContext, CancellationToken cancellationToken) 696private async Task<RetryResult> WatchInteractionsAsync(RetryContext retryContext, CancellationToken cancellationToken) 778private static async Task<bool> IsUnimplemented(AsyncDuplexStreamingCall<WatchInteractionsRequestUpdate, WatchInteractionsResponseUpdate> call) 847public async Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken) 1033public async Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, ExecuteResourceCommandOptions options, CancellationToken cancellationToken) 1108public async Task<string> UploadFileAsync(Stream fileStream, string fileName, long expectedSize, int interactionId, string inputName, CancellationToken cancellationToken)
ServiceClient\IDashboardClient.cs (2)
65Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, ExecuteResourceCommandOptions options, CancellationToken cancellationToken); 67Task<string> UploadFileAsync(Stream fileStream, string fileName, long expectedSize, int interactionId, string inputName, CancellationToken cancellationToken);
ServiceClient\IResourceRepository.cs (1)
16Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken);
ServiceClient\SelectedDashboardClient.cs (3)
34public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken) => dataSource.ResourceRepository.SubscribeResourcesAsync(cancellationToken); 61public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, ExecuteResourceCommandOptions options, CancellationToken cancellationToken) 67public Task<string> UploadFileAsync(Stream fileStream, string fileName, long expectedSize, int interactionId, string inputName, CancellationToken cancellationToken)
ServiceClient\SqliteResourceRepository.cs (1)
64public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
ServiceClient\TracingSqliteConnection.cs (11)
279public override Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken) => 282public override Task<object?> ExecuteScalarAsync(CancellationToken cancellationToken) => 307protected override async Task<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) 347private async Task<T> ExecuteWithActivityAsync<T>(Func<Task<T>> execute) 425public override Task<bool> NextResultAsync(CancellationToken cancellationToken) => 430public override Task<bool> ReadAsync(CancellationToken cancellationToken) => 433public override Task<T> GetFieldValueAsync<T>(int ordinal, CancellationToken cancellationToken) => 436public override Task<bool> IsDBNullAsync(int ordinal, CancellationToken cancellationToken) => 494private async Task<T> ExecuteReaderOperationAsync<T>(Func<Task<T>> operation)
src\Shared\FileLock.cs (1)
106public static async Task<FileLock> AcquireAsync(string lockPath, CancellationToken cancellationToken = default, TimeSpan? timeout = null)
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();
Terminal\DefaultTerminalConnectionResolver.cs (1)
41public async Task<Stream?> ConnectAsync(string resourceName, int replicaIndex, CancellationToken cancellationToken)
Terminal\ITerminalConnectionResolver.cs (1)
34Task<Stream?> ConnectAsync(string resourceName, int replicaIndex, CancellationToken cancellationToken);
Utils\CallbackThrottler.cs (1)
37private async Task<bool> TryQueueAsync(CancellationToken cancellationToken)
Utils\CancellationSeries.cs (1)
31public async Task<CancellationToken> NextAsync()
Utils\DashboardUIHelpers.cs (1)
73public static Task<DashboardMessageBarReference> DisplayMaxLimitMessageAsync(DashboardMessageBarService messageService, string title, string message, Action onClose)
Utils\FilterHelpers.cs (2)
101Func<CancellationToken, Task<List<string>>> getPropertyKeysAsync, 103Func<string, CancellationToken, Task<Dictionary<string, int>>> getFieldValuesAsync,
Utils\GlobalizationHelpers.cs (1)
141internal static async Task<RequestCulture?> ResolveSetCultureToAcceptedCultureAsync(string acceptLanguage, List<CultureInfo> availableCultures)
Aspire.Dashboard.Components.Tests (51)
Dialogs\FilterDialogTests.cs (1)
299static Task<Dictionary<string, int>> StartLoad(
Layout\DashboardDialogProviderTests.cs (8)
25var first = await OpenAsync(cut, "first", drawer: false, OnStateChange); 26var second = await OpenAsync(cut, "second", drawer: true, OnStateChange); 49var reopened = await OpenAsync(cut, "reopened", drawer: false, onStateChange: null); 62Task<DialogResult> result = null!; 81var result = await OpenAsync(plainProvider, "after-dispose", drawer: false, onStateChange: null); 91private async Task<Task<DialogResult>> OpenAsync(IRenderedFragment cut, string id, bool drawer, Action<DialogEventArgs>? onStateChange) 94Task<DialogResult> result = null!;
Model\DashboardDialogServiceTests.cs (4)
34var waitTask = WaitForDataAsync(_ => Task.FromResult(false), dialogService); 54var waitTask = WaitForDataAsync( 67private static Task<bool> WaitForDataAsync(Func<CancellationToken, Task<bool>> isAvailable, DashboardDialogService dialogService)
Pages\LoginTests.cs (3)
41builder.OpenComponent<CascadingValue<Task<AuthenticationState>>>(1); 42builder.AddAttribute(2, nameof(CascadingValue<Task<AuthenticationState>>.Value), tcs.Task); 43builder.AddAttribute(3, nameof(CascadingValue<Task<AuthenticationState>>.ChildContent), (RenderFragment)(childBuilder =>
Pages\TraceDetailsTests.cs (1)
986private static async Task<HashSet<string>> GetMatchingSpanIdsAsync(
Shared\TestLocalStorage.cs (2)
15public Task<StorageResult<T>> GetAsync<T>(string key) 25public async Task<StorageResult<T>> GetUnprotectedAsync<T>(string key)
Shared\TestTelemetryRepository.cs (13)
12public Func<GetLogsContext, CancellationToken, Task<PagedResult<LogSummary>>>? GetLogSummariesAsyncHandler { get; init; } 33public Task<PagedResult<OtlpLogEntry>> GetLogsAsync(GetLogsContext context, CancellationToken cancellationToken) => inner.GetLogsAsync(context, cancellationToken); 34public Task<PagedResult<LogSummary>> GetLogSummariesAsync(GetLogsContext context, CancellationToken cancellationToken) => 37public Task<List<OtlpLogEntry>> GetLogsForSpanAsync(string traceId, string spanId, CancellationToken cancellationToken) => inner.GetLogsForSpanAsync(traceId, spanId, cancellationToken); 38public Task<List<OtlpLogEntry>> GetLogsForTraceAsync(string traceId, CancellationToken cancellationToken) => inner.GetLogsForTraceAsync(traceId, cancellationToken); 39public Task<List<string>> GetLogPropertyKeysAsync(ResourceKey? resourceKey, CancellationToken cancellationToken) => inner.GetLogPropertyKeysAsync(resourceKey, cancellationToken); 40public Task<List<string>> GetTracePropertyKeysAsync(ResourceKey? resourceKey, CancellationToken cancellationToken) => inner.GetTracePropertyKeysAsync(resourceKey, cancellationToken); 41public Task<GetTracesResponse> GetTracesAsync(GetTracesRequest context, CancellationToken cancellationToken) => inner.GetTracesAsync(context, cancellationToken); 42public Task<GetTraceSummariesResponse> GetTraceSummariesAsync(GetTracesRequest context, CancellationToken cancellationToken) => inner.GetTraceSummariesAsync(context, cancellationToken); 43public Task<GetSpansResponse> GetSpansAsync(GetSpansRequest context, CancellationToken cancellationToken) => inner.GetSpansAsync(context, cancellationToken); 44public Task<Dictionary<string, int>> GetTraceFieldValuesAsync(string attributeName, CancellationToken cancellationToken) => inner.GetTraceFieldValuesAsync(attributeName, cancellationToken); 45public Task<Dictionary<string, int>> GetLogsFieldValuesAsync(string attributeName, CancellationToken cancellationToken) => inner.GetLogsFieldValuesAsync(attributeName, cancellationToken); 52public Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) => inner.GetInstrumentAsync(request, cancellationToken);
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\TestDashboardClient.cs (5)
22private readonly Func<string, string, CommandViewModel, ExecuteResourceCommandOptions, CancellationToken, Task<ResourceCommandResponseViewModel>>? _executeResourceCommand; 43Func<string, string, CommandViewModel, ExecuteResourceCommandOptions, CancellationToken, Task<ResourceCommandResponseViewModel>>? executeResourceCommand = null, 73public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, ExecuteResourceCommandOptions options, CancellationToken cancellationToken) 88public Task<string> UploadFileAsync(Stream fileStream, string fileName, long expectedSize, int interactionId, string inputName, CancellationToken cancellationToken) 129public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
tests\Shared\TestDashboardTelemetrySender.cs (1)
15public Task<bool> TryStartTelemetrySessionAsync()
tests\Shared\TestDialogService.cs (1)
39public override async Task<DialogResult> ShowDialogAsync(Type componentType, DialogOptions options)
tests\Shared\TestSessionStorage.cs (2)
11public Func<string, Task<(bool Success, object? Value)>>? OnGetTaskAsync { get; set; } 14public async Task<StorageResult<T>> GetAsync<T>(string key)
Aspire.Dashboard.Tests (71)
ChannelExtensionsTests.cs (1)
179var read2Task = resultChannel.Reader.ReadAsync().DefaultTimeout();
Integration\DashboardClientAuthTests.cs (3)
69private static async Task<ResourceServiceServer> CreateResourceServiceServerAsync(ILoggerFactory loggerFactory, bool useHttps, Action<TestCalls>? configureCalls = null) 110private static async Task<DashboardClient> CreateDashboardClientAsync( 176public override Task<ApplicationInformationResponse> GetApplicationInformation(
Integration\HealthTests.cs (1)
160public Task<Activity> Task => _completion.Task;
Integration\MockOpenIdAuthority.cs (1)
24public static async Task<Authority> CreateAsync()
Integration\Playwright\AccessibilityTests.cs (1)
558private static async Task<((int R, int G, int B) Foreground, (int R, int G, int B) Background)> ReadFluentControlColorsAsync(ILocator host)
Integration\Playwright\AppBarTests.cs (1)
66async Task<ILocator> GetThemeRadioAsync()
Integration\Playwright\BrowserTokenAuthenticationTests.cs (1)
188private static async Task<IBrowser> LaunchWebKitAsync(IPlaywright playwright)
Integration\Playwright\Infrastructure\MockDashboardClient.cs (3)
51public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, ExecuteResourceCommandOptions options, CancellationToken cancellationToken) => throw new NotImplementedException(); 52public Task<string> UploadFileAsync(Stream fileStream, string fileName, long expectedSize, int interactionId, string inputName, CancellationToken cancellationToken) => throw new NotImplementedException(); 59public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
Integration\Playwright\Infrastructure\PlaywrightTestsBase.cs (1)
36private async Task<IPage> CreateNewPageAsync()
Integration\StartupTests.cs (3)
110var runTask = app.RunAsync(cts.Token); 995private async Task<(string? Host, string? Proto, string EndpointString)> ExecuteForwardedHeadersScenarioAsync( 1141private static async Task<string> CreateBrowserTokenConfigFileAsync(DirectoryInfo fileConfigDirectory, string browserToken)
Middleware\ValidateTokenMiddlewareTests.cs (1)
92private static async Task<IHost> SetUpHostAsync(FrontendAuthMode authMode, string expectedToken)
Model\DashboardClientTests.cs (5)
128var subscribeTask = client.SubscribeResourcesAsync(CancellationToken.None); 579var commandTask = instance.ExecuteResourceCommandAsync( 686private static async Task<ResourceCommandResponse> WaitForCallCancellationAsync(CancellationToken cancellationToken) 719public Task<bool> MoveNext(CancellationToken cancellationToken) 736public Task<bool> MoveNext(CancellationToken cancellationToken)
Model\DashboardDataSourceTests.cs (1)
1291private static async Task<SqliteRepositoryTestContext<SqliteTelemetryRepository>> CreateTelemetryRepositoryAsync(
Model\GenAIVisualizerDialogViewModelTests.cs (1)
1681private static Task<GenAIVisualizerDialogViewModel> CreateAsync(
Model\SqliteResourceRepositoryTests.cs (1)
935private static async Task<IReadOnlyList<string>> CaptureSqlQueriesAsync(Func<Task> action)
Model\StructuredLogsPageViewModelTests.cs (1)
223private static async Task<StructureLogsDetailsViewModel> CreateLogDetailsViewModelAsync(SqliteTelemetryRepository repository, LogLevel severity, string message)
Model\TelemetryExportServiceTests.cs (2)
1261private async Task<TelemetryExportService> CreateExportServiceAsync(ITelemetryRepository repository, bool isDashboardClientEnabled = true) 1345private static async Task<SqliteRepositoryTestContext<SqliteTelemetryRepository>> CreateRepositoryAsync(
OtlpApiKeyAuthenticationHandlerTests.cs (1)
76private static async Task<OtlpApiKeyAuthenticationHandler> CreateAuthHandlerAsync(string primaryApiKey, string? secondaryApiKey, string? otlpApiKeyHeader)
ResourceOutgoingPeerResolverTests.cs (4)
682private sealed class MockDashboardClient(Task<ResourceViewModelSubscription> subscribeResult) : IDashboardClient 695public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, ExecuteResourceCommandOptions options, CancellationToken cancellationToken) => throw new NotImplementedException(); 696public Task<string> UploadFileAsync(Stream fileStream, string fileName, long expectedSize, int interactionId, string inputName, CancellationToken cancellationToken) => throw new NotImplementedException(); 704public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
Shared\SqliteRepositoryTestHelpers.cs (1)
99public static async Task<SqliteRepositoryTestContext<SqliteTelemetryRepository>> CreateTelemetryRepositoryAsync(
Telemetry\DashboardTelemetrySenderTests.cs (3)
156private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _value; 158public TestHttpMessageHandler(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> value) 163protected 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\MetricsTests.cs (1)
2057async Task<OtlpInstrumentData> GetInstrumentAsync(IReadOnlyList<MetricDimensionCursor> dimensionCursors)
TelemetryRepositoryTests\SqliteTelemetryPersistenceTests.cs (2)
37var queryTask = SqliteTelemetryRepository.RunReadAsync(token => 949private static async Task<SqliteRepositoryTestContext<SqliteTelemetryRepository>> CreateRepositoryAsync(
TelemetryRepositoryTests\TelemetryRepositoryTestBase.cs (1)
14protected async Task<RepositoryTestContext> CreateRepositoryAsync(
TelemetryRepositoryTests\TelemetryRepositoryTests.cs (2)
450var watchTask = Task.Run(async () => 567var watchTask = Task.Run(async () =>
Terminal\DefaultTerminalConnectionResolverTests.cs (3)
152public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, ExecuteResourceCommandOptions options, CancellationToken cancellationToken) => throw new NotImplementedException(); 153public Task<string> UploadFileAsync(Stream fileStream, string fileName, long expectedSize, int interactionId, string inputName, CancellationToken cancellationToken) => throw new NotImplementedException(); 157public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken) => throw new NotImplementedException();
Terminal\TerminalWebSocketProxyEndpointTests.cs (3)
106private static async Task<IHost> BuildHostAsync(ITerminalConnectionResolver resolver) 172public Task<Stream?> ConnectAsync(string resourceName, int replicaIndex, CancellationToken cancellationToken) 190protected override Task<AuthenticateResult> HandleAuthenticateAsync()
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\TestDashboardClient.cs (5)
22private readonly Func<string, string, CommandViewModel, ExecuteResourceCommandOptions, CancellationToken, Task<ResourceCommandResponseViewModel>>? _executeResourceCommand; 43Func<string, string, CommandViewModel, ExecuteResourceCommandOptions, CancellationToken, Task<ResourceCommandResponseViewModel>>? executeResourceCommand = null, 73public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, ExecuteResourceCommandOptions options, CancellationToken cancellationToken) 88public Task<string> UploadFileAsync(Stream fileStream, string fileName, long expectedSize, int interactionId, string inputName, CancellationToken cancellationToken) 129public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
tests\Shared\TestDashboardTelemetrySender.cs (1)
15public Task<bool> TryStartTelemetrySessionAsync()
tests\Shared\TestDialogService.cs (1)
39public override async Task<DialogResult> ShowDialogAsync(Type componentType, DialogOptions options)
tests\Shared\TestSessionStorage.cs (2)
11public Func<string, Task<(bool Success, object? Value)>>? OnGetTaskAsync { get; set; } 14public async Task<StorageResult<T>> GetAsync<T>(string key)
Aspire.Deployment.EndToEnd.Tests (72)
AcaCompactNamingDeploymentTests.cs (2)
80var pendingRun = terminal.RunAsync(cancellationToken); 234var pendingRun = terminal.RunAsync(cancellationToken);
AcaCompactNamingUpgradeDeploymentTests.cs (1)
78var pendingRun = terminal.RunAsync(cancellationToken);
AcaCustomRegistryDeploymentTests.cs (1)
67var pendingRun = terminal.RunAsync(cancellationToken);
AcaDeploymentErrorOutputTests.cs (1)
70var pendingRun = terminal.RunAsync(cancellationToken);
AcaExistingRegistryDeploymentTests.cs (1)
79var pendingRun = terminal.RunAsync(cancellationToken);
AcaManagedRedisDeploymentTests.cs (1)
68var pendingRun = terminal.RunAsync(cancellationToken);
AcaStarterDeploymentTests.cs (1)
68var pendingRun = terminal.RunAsync(cancellationToken);
AcrPurgeTaskDeploymentTests.cs (1)
67var pendingRun = terminal.RunAsync(cancellationToken);
AksAzureKubernetesEnvironmentCertManagerDeploymentTests.cs (1)
81var pendingRun = terminal.RunAsync(cancellationToken);
AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.cs (1)
83var pendingRun = terminal.RunAsync(cancellationToken);
AksAzureKubernetesEnvironmentGatewayDeploymentTests.cs (1)
71var pendingRun = terminal.RunAsync(cancellationToken);
AksBlazorRedisDeploymentTests.cs (1)
67var pendingRun = terminal.RunAsync(cancellationToken);
AksMultipleNodePoolsDeploymentTests.cs (1)
67var pendingRun = terminal.RunAsync(cancellationToken);
AksPersistentVolumeDeploymentTests.cs (1)
57var pendingRun = terminal.RunAsync(cancellationToken);
AksStarterDeploymentTests.cs (1)
75var pendingRun = terminal.RunAsync(cancellationToken);
AksStarterWithRedisHelmDeploymentTests.cs (1)
77var pendingRun = terminal.RunAsync(cancellationToken);
AksVnetInfraDeploymentTests.cs (1)
62var pendingRun = terminal.RunAsync(cancellationToken);
AksVnetWithAzureResourcesDeploymentTests.cs (1)
67var pendingRun = terminal.RunAsync(cancellationToken);
AksWithAzureResourcesDeploymentTests.cs (1)
67var pendingRun = terminal.RunAsync(cancellationToken);
AksWithHelmChartDeploymentTests.cs (1)
72var pendingRun = terminal.RunAsync(cancellationToken);
AppServicePythonDeploymentTests.cs (1)
69var pendingRun = terminal.RunAsync(cancellationToken);
AppServiceReactDeploymentTests.cs (3)
69var pendingRun = terminal.RunAsync(cancellationToken); 437var standardOutputTask = process.StandardOutput.ReadToEndAsync(); 438var standardErrorTask = process.StandardError.ReadToEndAsync();
AppServiceStoragePrivateEndpointDeploymentTests.cs (3)
61var pendingRun = terminal.RunAsync(cancellationToken); 410var standardOutputTask = process.StandardOutput.ReadToEndAsync(); 411var standardErrorTask = process.StandardError.ReadToEndAsync();
AzureAppConfigDeploymentTests.cs (1)
63var pendingRun = terminal.RunAsync(cancellationToken);
AzureConnectorNamespaceDeploymentTests.cs (4)
80var pendingRun = terminal.RunAsync(cancellationToken); 279private async Task<(bool Succeeded, string Message)> CleanupResourceGroupAsync( 298var stdoutTask = process.StandardOutput.ReadToEndAsync(); 299var stderrTask = process.StandardError.ReadToEndAsync();
AzureContainerRegistryDeploymentTests.cs (1)
63var pendingRun = terminal.RunAsync(cancellationToken);
AzureEventHubsDeploymentTests.cs (1)
63var pendingRun = terminal.RunAsync(cancellationToken);
AzureKeyVaultDeploymentTests.cs (1)
63var pendingRun = terminal.RunAsync(cancellationToken);
AzureLogAnalyticsDeploymentTests.cs (1)
63var pendingRun = terminal.RunAsync(cancellationToken);
AzureResourceScopeDeploymentTests.cs (1)
65var pendingRun = terminal.RunAsync(cancellationToken);
AzureRoleAssignmentRunModeTests.cs (1)
72var pendingRun = terminal.RunAsync(cancellationToken);
AzureSandboxesDeploymentTests.cs (3)
669private async Task<(bool Success, string Message)> CleanupResourceGroupAsync( 701var stdoutTask = process.StandardOutput.ReadToEndAsync(); 702var stderrTask = process.StandardError.ReadToEndAsync();
AzureServiceBusDeploymentTests.cs (1)
63var pendingRun = terminal.RunAsync(cancellationToken);
AzureStorageDeploymentTests.cs (2)
74var pendingRun = terminal.RunAsync(cancellationToken); 230var pendingRun = terminal.RunAsync(cancellationToken);
AzureStorageRunModeTests.cs (1)
60var pendingRun = terminal.RunAsync(cancellationToken);
FoundryHostedAgentDeploymentTests.cs (6)
82var pendingRun = terminal.RunAsync(cancellationToken); 225private static async Task<ToolboxTestResources> GetToolboxTestResourcesAsync( 374private static async Task<ToolboxDeploymentSnapshot> InspectToolboxAsync( 451private static async Task<IReadOnlyList<string>> ListToolboxToolsAsync( 572private static async Task<McpResponse> SendMcpRequestAsync( 723var pendingRun = terminal.RunAsync(cancellationToken);
FrontDoorDeploymentTests.cs (1)
67var pendingRun = terminal.RunAsync(cancellationToken);
Helpers\DeploymentE2EAutomatorHelpers.cs (3)
104internal static async Task<CliInstallStrategy> InstallAspireCliAsync( 121internal static Task<CliInstallStrategy> InstallCurrentBuildAspireCliAsync( 137internal static Task<CliInstallStrategy> InstallCurrentBuildAspireBundleAsync(
KubernetesGatewayTlsDeploymentTests.cs (1)
83var pendingRun = terminal.RunAsync(cancellationToken);
KubernetesHelmChartDeploymentTests.cs (1)
78var pendingRun = terminal.RunAsync(cancellationToken);
NspStorageKeyVaultDeploymentTests.cs (1)
66var pendingRun = terminal.RunAsync(cancellationToken);
PythonFastApiDeploymentTests.cs (1)
69var pendingRun = terminal.RunAsync(cancellationToken);
RadiusAzureResourcesDeploymentTests.cs (1)
48var pendingRun = terminal.RunAsync(cancellationToken);
RadiusStarterDeploymentTests.cs (1)
97var pendingRun = terminal.RunAsync(cancellationToken);
TypeScriptAzureContainerAppJobDeploymentTests.cs (1)
58var pendingRun = terminal.RunAsync(cancellationToken);
TypeScriptExpressDeploymentTests.cs (1)
65var pendingRun = terminal.RunAsync(cancellationToken);
TypeScriptJavaScriptHostingDeploymentTests.cs (1)
58var pendingRun = terminal.RunAsync(cancellationToken);
TypeScriptVnetSqlServerInfraDeploymentTests.cs (1)
62var pendingRun = terminal.RunAsync(cancellationToken);
VnetKeyVaultConnectivityDeploymentTests.cs (1)
64var pendingRun = terminal.RunAsync(cancellationToken);
VnetKeyVaultInfraDeploymentTests.cs (1)
61var pendingRun = terminal.RunAsync(cancellationToken);
VnetSqlServerConnectivityDeploymentTests.cs (1)
69var pendingRun = terminal.RunAsync(cancellationToken);
VnetSqlServerInfraDeploymentTests.cs (1)
61var pendingRun = terminal.RunAsync(cancellationToken);
VnetStorageBlobConnectivityDeploymentTests.cs (1)
64var pendingRun = terminal.RunAsync(cancellationToken);
VnetStorageBlobInfraDeploymentTests.cs (1)
61var 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 (330)
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)
151public Dictionary<string, Func<X509Certificate2Collection, CancellationToken, Task<byte[]>>> CustomBundlesFactories { get; } = new();
ApplicationModel\CommandLineArgsCallbackAnnotation.cs (4)
17private Task<IList<object>>? _callbackTask; 53Task<IList<object>> IArgCallbackAnnotation.EvaluateOnceAsync(CommandLineArgsCallbackContext context) 73bool IArgCallbackAnnotation.TryGetCachedResult(out Task<IList<object>>? result) 82private async Task<IList<object>> ExecuteCallbackAsync(CommandLineArgsCallbackContext context)
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 (4)
148Task<ExecuteCommandResult>? activeRebuildTask = null; 176async Task<ExecuteCommandResult> ExecuteRebuildAndResetAsync(ExecuteCommandContext context) 192private static async Task<ExecuteCommandResult> ExecuteRebuildAsync(ExecuteCommandContext context, IResource projectResource) 244async Task<ExecuteCommandResult> FinishAsync(ExecuteCommandResult result)
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
269public required Func<ContainerFileSystemCallbackContext, CancellationToken, Task<IEnumerable<ContainerFileSystemItem>>> Callback { get; init; }
ApplicationModel\ContainerImagePushOptions.cs (1)
73public async Task<string> GetFullRemoteImageNameAsync(
ApplicationModel\DebugSupportExtensions.cs (3)
125public static Task<object> CreateLaunchConfigurationAsync( 152/// <see cref="ResourceBuilderExtensions.WithDebugSupport{T, TLaunchConfiguration}(IResourceBuilder{T}, Func{LaunchConfigurationCallbackContext, Task{TLaunchConfiguration}}, string)"/>, 164internal static Task<object> CreateLaunchConfigurationAsync(
ApplicationModel\DockerfileBuildAnnotation.cs (2)
47public Func<DockerfileFactoryContext, Task<string>>? DockerfileFactory { get; init; } 198private static async Task<bool> IsGeneratedBuildContextIgnoreAsync(string path, string content, CancellationToken cancellationToken)
ApplicationModel\EndpointAnnotation.cs (1)
455public Task<AllocatedEndpoint> GetAllocatedEndpointAsync(NetworkIdentifier networkId, CancellationToken cancellationToken = default)
ApplicationModel\EnvironmentCallbackAnnotation.cs (4)
17private Task<Dictionary<string, object>>? _callbackTask; 86Task<Dictionary<string, object>> IEnvCallbackAnnotation.EvaluateOnceAsync(EnvironmentCallbackContext context) 106bool IEnvCallbackAnnotation.TryGetCachedResult(out Task<Dictionary<string, object>>? result) 115private async Task<Dictionary<string, object>> ExecuteCallbackAsync(EnvironmentCallbackContext context)
ApplicationModel\ExecutableLaunchRecipe.cs (6)
24Task<ExecutableLaunchPlan> CreateLaunchPlanAsync(ExecutableLaunchContext context); 311public async Task<ExecutableLaunchPlan> CreateLaunchPlanAsync(ExecutableLaunchContext context) 370private static async Task<IReadOnlyList<JsonElement>> CreateLaunchConfigurationsAsync(ExecutableLaunchContext context) 389internal static async Task<JsonElement> ProduceLaunchConfigurationAsync( 433public async Task<ExecutableLaunchPlan> CreateLaunchPlanAsync(ExecutableLaunchContext context) 530private static async Task<IReadOnlyList<JsonElement>> CreateLaunchConfigurationsAsync(
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 (2)
66public Func<HttpCommandResultContext, Task<ExecuteCommandResult>>? GetCommandResult { get; set; } 129public Func<HttpCommandPrepareRequestContext, Task<HttpCommandRequestExportData>>? PrepareRequest { get; init; }
ApplicationModel\ICallbackResourceAnnotation.cs (2)
20Task<TResult> EvaluateOnceAsync(TContext context); 39bool TryGetCachedResult(out Task<TResult>? result);
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\LaunchToolArgsCallbackAnnotation.cs (4)
36private Task<IList<object>>? _callbackTask; 93Task<IList<object>> IArgCallbackAnnotation.EvaluateOnceAsync(CommandLineArgsCallbackContext context) 110bool IArgCallbackAnnotation.TryGetCachedResult(out Task<IList<object>>? result) 119private async Task<IList<object>> ExecuteCallbackAsync(CommandLineArgsCallbackContext context)
ApplicationModel\McpServerEndpointAnnotation.cs (2)
19public McpServerEndpointAnnotation(Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>> endpointUrlResolver) 28public Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>> EndpointUrlResolver { get; }
ApplicationModel\ProcessCommandOptions.cs (2)
84public Func<ProcessCommandResultContext, Task<ExecuteCommandResult>>? GetCommandResult { get; set; } 131public Func<ExecuteCommandContext, Task<ProcessCommandSpecExportData>>? CreateProcessSpec { get; init; }
ApplicationModel\ProjectResource.cs (1)
224private 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 (2)
49public async Task<RequiredCommandValidationResult> ValidateAsync( 187Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>>? Callback);
ApplicationModel\ResourceCommandAnnotation.cs (4)
23Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 41Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 58Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 113public Func<ExecuteCommandContext, Task<ExecuteCommandResult>> ExecuteCommand { get; }
ApplicationModel\ResourceCommandService.cs (14)
62public async Task<ExecuteCommandResult> ExecuteCommandAsync(string resourceId, string commandName, CancellationToken cancellationToken = default) 92public async Task<ExecuteCommandResult> ExecuteCommandAsync(string resourceId, string commandName, InteractionInputCollection arguments, CancellationToken cancellationToken = default) 115public async Task<ExecuteCommandResult> ExecuteCommandAsync(IResource resource, string commandName, CancellationToken cancellationToken = default) 130public async Task<ExecuteCommandResult> ExecuteCommandAsync(IResource resource, string commandName, InteractionInputCollection arguments, CancellationToken cancellationToken = default) 149var tasks = new List<Task<ExecuteCommandResult>>(); 306internal async Task<ExecuteCommandResult> ExecuteCommandAsync(string resourceId, string commandName, ResourceCommandExecutionOptions options, CancellationToken cancellationToken) 313internal async Task<ExecuteCommandResult> ExecuteCommandAsync(IResource resource, string commandName, IReadOnlyDictionary<string, string?>? argumentValues, CancellationToken cancellationToken) 326internal async Task<ExecuteCommandResult> ExecuteCommandCoreAsync(string resourceId, IResource resource, string commandName, InteractionInputCollection arguments, bool argumentsProvided, bool nonInteractive, CancellationToken cancellationToken) 413private async Task<ExecuteCommandResult> ExecuteCommandWithOptionalProgressAsync( 468internal async Task<(ExecuteCommandResult Result, InteractionInputCollection? Arguments)> ValidateCommandArgumentsAsync(string resourceId, string commandName, InteractionInputCollection arguments, CancellationToken cancellationToken) 500private async Task<ExecuteCommandResult> ExecuteCommandCoreAsync(string resourceId, string commandName, ResourceCommandExecutionOptions options, CancellationToken cancellationToken) 572private async Task<bool> ValidateArgumentsAsync(ResourceCommandAnnotation annotation, InteractionInputCollection arguments, HashSet<string>? loadedDynamicArgumentNames, CancellationToken cancellationToken) 659private async Task<HashSet<string>> LoadDynamicCommandArgumentsAsync(InteractionInputCollection arguments, CancellationToken cancellationToken) 698private async Task<(InteractionInputCollection? Arguments, ExecuteCommandResult? Result)> PromptForCommandArgumentsAsync(ResourceCommandAnnotation annotation, InteractionInputCollection arguments, CancellationToken cancellationToken)
ApplicationModel\ResourceExtensions.cs (10)
318return annotation.AsCallbackAnnotation().TryGetCachedResult(out var cachedTask) && cachedTask!.IsCompletedSuccessfully 657private static async Task<ResolvedValue?> GetValue(this IResource resource, DistributedApplicationExecutionContext executionContext, string? key, IValueProvider valueProvider, ILogger logger, CancellationToken cancellationToken) 1319internal static async Task<ContainerImagePushOptions> ProcessImagePushOptionsCallbackAsync( 1406internal static async Task<string> GetFullRemoteImageNameAsync( 1484public static Task<IReadOnlySet<IResource>> GetResourceDependenciesAsync( 1516public static Task<IReadOnlySet<IResource>> GetResourceDependenciesAsync( 1547internal static async Task<IReadOnlySet<IResource>> GetDependenciesAsync( 1633private static async Task<List<object>> GatherRawEnvironmentAndArgumentValuesAsync( 1651if (ann.AsCallbackAnnotation().TryGetCachedResult(out var cachedTask) && 1690if (ann.AsCallbackAnnotation().TryGetCachedResult(out var cachedTask) &&
ApplicationModel\ResourceNotificationService.cs (7)
121/// <returns>A <see cref="Task{String}"/> representing the wait operation and which of the target states the resource reached.</returns> 124public async Task<string> WaitForResourceAsync(string resourceName, IEnumerable<string> targetStates, CancellationToken cancellationToken = default) 204public async Task<ResourceEvent> WaitForResourceHealthyAsync(string resourceName, CancellationToken cancellationToken = default) 237public async Task<ResourceEvent> WaitForResourceHealthyAsync(string resourceName, WaitBehavior waitBehavior, CancellationToken cancellationToken = default) 645/// <returns>A <see cref="Task{ResourceEvent}"/> representing the wait operation and which of the target states the resource reached.</returns> 648public async Task<ResourceEvent> WaitForResourceAsync(string resourceName, Func<ResourceEvent, bool> predicate, CancellationToken cancellationToken = default) 661private async Task<ResourceEvent> WaitForResourceCoreAsync(string resourceName, Func<ResourceEvent, bool> predicate, string cancellationMessage, CancellationToken cancellationToken = default, string waitCondition = "predicate")
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 (3)
136public virtual global::System.Threading.Tasks.Task<global::Aspire.DashboardService.Proto.V1.ApplicationInformationResponse> GetApplicationInformation(global::Aspire.DashboardService.Proto.V1.ApplicationInformationRequest request, grpc::ServerCallContext context) 154public virtual global::System.Threading.Tasks.Task<global::Aspire.DashboardService.Proto.V1.ResourceCommandResponse> ExecuteResourceCommand(global::Aspire.DashboardService.Proto.V1.ResourceCommandRequest request, grpc::ServerCallContext context) 166public virtual global::System.Threading.Tasks.Task<global::Aspire.DashboardService.Proto.V1.UploadFileResponse> UploadFile(grpc::IAsyncStreamReader<global::Aspire.DashboardService.Proto.V1.UploadFileChunk> requestStream, grpc::ServerCallContext context)
Ats\AspireExportAttribute.cs (1)
230/// <see cref="Task{TResult}"/>, <see cref="ValueTask"/>, or <see cref="ValueTask{TResult}"/>. This is important
Ats\ExecutionConfigurationExports.cs (1)
40public static Task<IExecutionConfigurationResult> Build(
Ats\HealthCheckExports.cs (1)
22public static void AddHealthCheck(this IDistributedApplicationBuilder builder, string name, Func<Task<HealthCheckResult>> check)
Ats\InteractionExports.cs (6)
54public static async Task<BoolInteractionResult> PromptConfirmation( 71public static async Task<BoolInteractionResult> PromptMessageBox( 88public static async Task<BoolInteractionResult> PromptNotification( 107public static async Task<BoolInteractionResult> PromptProgress( 125public static async Task<InputInteractionResult> PromptInput( 146public static async Task<InputsInteractionResult> PromptInputs(
Ats\NotificationExports.cs (2)
43public static Task<string> WaitForResourceStates( 55public static async Task<ResourceEventDto> WaitForResourceHealthy(
Ats\PipelineExports.cs (2)
75public static Task<IReportingTask> CreateTask(this IReportingStep reportingStep, string statusText, CancellationToken cancellationToken = default) 87public static Task<IReportingTask> CreateMarkdownTask(this IReportingStep reportingStep, string markdownString, CancellationToken cancellationToken = default)
Ats\ResourceCommandExports.cs (2)
37public static Task<ExecuteCommandResult> ExecuteCommandAsync( 56private static Task<ExecuteCommandResult> ExecuteByResourceIdAsync(
Backchannel\AppHostRpcTarget.cs (4)
178public async Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) 209public Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken) 252public async Task<UploadFileResponse> UploadFileAsync(UploadFileRequest request, CancellationToken cancellationToken = default) 291public async Task<GetPipelineStepsResponse> GetPipelineStepsAsync(GetPipelineStepsRequest? request = null, CancellationToken cancellationToken = default)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (29)
45public Task<GetCapabilitiesResponse> GetCapabilitiesAsync(GetCapabilitiesRequest? request = null, CancellationToken cancellationToken = default) 70public async Task<GetAppHostInfoResponse> GetAppHostInfoAsync(GetAppHostInfoRequest? request = null, CancellationToken cancellationToken = default) 93public async Task<GetDashboardInfoResponse> GetDashboardInfoAsync(GetDashboardInfoRequest? request = null, CancellationToken cancellationToken = default) 124public async Task<GetResourcesResponse> GetResourcesAsync(GetResourcesRequest? request = null, CancellationToken cancellationToken = default) 227public async Task<CallMcpToolResponse> CallMcpToolAsync(CallMcpToolRequest request, CancellationToken cancellationToken = default) 261public async Task<StopAppHostResponse> StopAsync(StopAppHostRequest? request = null, CancellationToken cancellationToken = default) 274public async Task<ExecuteResourceCommandResponse> ExecuteResourceCommandAsync(ExecuteResourceCommandRequest request, CancellationToken cancellationToken = default) 359private static async Task<(ExecuteCommandResult Result, InteractionInputCollection? Arguments)> ValidateResourceCommandAsync(ResourceCommandService resourceCommandService, string resourceName, string commandName, InteractionInputCollection arguments, CancellationToken cancellationToken) 433public async Task<GetTerminalInfoResponse> GetTerminalInfoAsync(GetTerminalInfoRequest request, CancellationToken cancellationToken = default) 475private async Task<(TerminalReplicaInfo[] Replicas, bool AnyHostReachable)> CollectReplicaInfosAsync( 481var tasks = new Task<(TerminalReplicaInfo Info, bool HostResponded)>[hosts.Count]; 505private async Task<(TerminalReplicaInfo Info, bool HostResponded)> QueryReplicaAsync( 587public async Task<ListTerminalsResponse> ListTerminalsAsync(ListTerminalsRequest? request = null, CancellationToken cancellationToken = default) 634public async Task<WaitForResourceResponse> WaitForResourceAsync(WaitForResourceRequest request, CancellationToken cancellationToken = default) 676private static async Task<WaitForResourceResponse> WaitForHealthyAsync(ResourceNotificationService notificationService, WaitResourceTarget target, CancellationToken cancellationToken) 707private static async Task<WaitForResourceResponse> WaitForRunningAsync(ResourceNotificationService notificationService, WaitResourceTarget target, CancellationToken cancellationToken) 731private static async Task<WaitForResourceResponse> WaitForTerminalAsync(ResourceNotificationService notificationService, WaitResourceTarget target, CancellationToken cancellationToken) 748private static async Task<ResourceEvent> WaitForResourceEventAsync( 860public Task<AppHostInformation> GetAppHostInformationAsync(CancellationToken cancellationToken = default) 923public async Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken = default) 946public async Task<WaitForAppHostReadyResponse> WaitForAppHostReadyAsync(WaitForAppHostReadyRequest? request = null, CancellationToken cancellationToken = default) 960public Task<DashboardMcpConnectionInfo?> GetDashboardMcpConnectionInfoAsync(CancellationToken cancellationToken = default) 972public async Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(CancellationToken cancellationToken = default) 977private async Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(bool resourcePropertiesAsJson, CancellationToken cancellationToken) 1046private async Task<ResourceSnapshot?> CreateResourceSnapshotFromEventAsync( 1234private async Task<HashSet<string>> GetResolvedSecretParameterValuesAsync(CancellationToken cancellationToken) 1301private async Task<IReadOnlyList<ParameterResource>> GetSecretParametersAsync(CancellationToken cancellationToken) 1775public async Task<CallToolResult> CallResourceMcpToolAsync( 1887private async Task<Tool[]?> TryListToolsAsync(Uri endpointUri, CancellationToken cancellationToken)
Backchannel\DashboardUrlsHelper.cs (2)
29public static async Task<DashboardConnectionInfo> GetDashboardConnectionInfoAsync( 166public static async Task<DashboardUrlsState> GetDashboardUrlsAsync(
Backchannel\TerminalHostControlClient.cs (2)
36public static async Task<TerminalHostSessionInfo> GetSessionAsync( 54private static async Task<JsonRpc> ConnectWithRetryAsync(string socketPath, CancellationToken cancellationToken)
ContainerResourceBuilderExtensions.cs (5)
823public static IResourceBuilder<T> WithDockerfileFactory<T>(this IResourceBuilder<T> builder, string contextPath, Func<DockerfileFactoryContext, Task<string>> dockerfileFactory, string? stage = null) where T : ContainerResource 981public static IResourceBuilder<ContainerResource> AddDockerfileFactory(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, Func<DockerfileFactoryContext, Task<string>> dockerfileFactory, string? stage = null) 1460public 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 1603Func<ContainerFileSystemCallbackContext, CancellationToken, Task<IEnumerable<ContainerFileSystemItem>>> callback, 1721Func<DockerfileFactoryContext, Task<string>> dockerfileFactory = async factoryContext =>
Dashboard\DashboardService.cs (3)
46public override Task<ApplicationInformationResponse> GetApplicationInformation( 398public override async Task<ResourceCommandResponse> ExecuteResourceCommand(ResourceCommandRequest request, ServerCallContext context) 500public override async Task<UploadFileResponse> UploadFile(IAsyncStreamReader<UploadFileChunk> requestStream, ServerCallContext context)
Dashboard\DashboardServiceAuth.cs (1)
35protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Dashboard\DashboardServiceData.cs (1)
125internal async Task<(ExecuteCommandResultType result, string? message, ApplicationModel.CommandResultData? value, InteractionInputCollection? invalidArguments)> ExecuteCommandAsync(string resourceId, string type, ExecuteResourceCommandOptions options, CancellationToken cancellationToken)
Dashboard\DashboardServiceHost.cs (1)
243public async Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dcp\ContainerCreator.cs (7)
62private Task<AppResource<ContainerNetworkTunnelProxy>>? _tunnelCreationTask; 93private async Task<string> GetContainerHostNameAsync(CancellationToken cancellationToken = default) 476private async Task<AppResource<ContainerNetworkTunnelProxy>> CreateTunnelProxyResourceAsync( 636internal async Task<IEnumerable<HostResourceWithEndpoints>> GetHostDependenciesAsync(IResource resource, CancellationToken cancellationToken) 685private async Task<(IExecutionConfigurationResult, ContainerPemCertificates?, List<ContainerCreateFileSystem>?)> 867private async Task<List<ContainerCreateFileSystem>> BuildCreateFilesAsync(BuildCreateFilesContext context, CancellationToken cancellationToken) 903private async Task<(List<string>, bool)> BuildRunArgsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken)
Dcp\DcpDependencyCheck.cs (2)
32public async Task<DcpInfo?> GetDcpInfoAsync(bool force = false, CancellationToken cancellationToken = default) 53Task<ProcessResult> task;
Dcp\DcpExecutor.cs (5)
392private async Task<HashSet<string>> WatchUntilDesiredStateAsync<TDcpResource>( 549public async Task<IReadOnlyList<TDcpResource>> WaitForStateAsync<TDcpResource>( 604Task<T> IDcpObjectFactory.PatchDcpObjectAsync<T>(T obj, Action<T> change, CancellationToken cancellationToken) 607private async Task<T> PatchDcpObjectAsync<T>(T obj, Action<T> change, CancellationToken cancellationToken) 1421private async Task<bool> PublishEndpointsAllocatedEventAsync(IResource resource, CancellationToken ct)
Dcp\DcpHost.cs (1)
593var 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\DcpResourceWatcher.cs (1)
425private async Task<bool> FlushCurrentLogsAsync<T>(T resource, ResourceStatus status, CancellationToken cancellationToken)
Dcp\ExecutableConfigurationResolver.cs (1)
31public async Task<ExecutableConfigurationResult> ResolveAsync(
Dcp\ExecutableCreator.cs (1)
117internal static async Task<ExecutableLaunchPlan> ResolveLaunchPlanAsync(
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)
11Task<DcpInfo?> GetDcpInfoAsync(bool force = false, CancellationToken cancellationToken = default);
Dcp\IDcpObjectFactory.cs (2)
35Task<TDcpResource> PatchDcpObjectAsync<TDcpResource>(TDcpResource obj, Action<TDcpResource> change, CancellationToken cancellationToken) 52Task<IReadOnlyList<TDcpResource>> WaitForStateAsync<TDcpResource>(
Dcp\KubernetesService.cs (16)
39Task<T> GetAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) 41Task<T> CreateAsync<T>(T obj, CancellationToken cancellationToken = default) 43Task<T> PatchAsync<T>(T obj, V1Patch patch, CancellationToken cancellationToken = default) 45Task<List<T>> ListAsync<T>(string? namespaceParameter = null, CancellationToken cancellationToken = default) 47Task<T> DeleteAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) 66Task<Stream> GetLogStreamAsync<T>( 98public Task<T> GetAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) 129public Task<T> CreateAsync<T>(T obj, CancellationToken cancellationToken = default) 162public Task<T> PatchAsync<T>(T obj, V1Patch patch, CancellationToken cancellationToken = default) 197public Task<List<T>> ListAsync<T>(string? namespaceParameter = null, CancellationToken cancellationToken = default) 227public Task<T> DeleteAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) 276var responseTask = string.IsNullOrEmpty(namespaceParameter) 311public Task<Stream> GetLogStreamAsync<T>( 457private async Task<TResult> ExecuteWithRetry<TResult>( 460Func<DcpKubernetesClient, CancellationToken, Task<TResult>> operation, 582private async Task<KubernetesClientReady> EnsureKubernetesAsync(CancellationToken cancellationToken = default)
Dcp\Process\IProcessRunner.cs (2)
14(Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec); 22public (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
Dcp\Process\ProcessUtil.cs (1)
22public static (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
DeveloperCertificateService.cs (2)
166internal static async Task<(char[]? keyPem, byte[]? pfxBytes)> GetKeyMaterialAsync( 207internal static async Task<(string? certificateFilePath, string? keyFilePath, string? thumbprint)> GetCachedCertificateFilePathsAsync(
DotnetToolResourceExtensions.cs (1)
210internal static async Task<RequiredCommandValidationResult> ValidateDotnetSdkVersionAsync(RequiredCommandValidationContext _, string workingDirectory)
ExternalServiceBuilderExtensions.cs (4)
345public static async Task<HealthCheckResult> CheckUriAsync(Uri uri, int expectedStatusCode, Func<HttpClient> httpClientFactory, HealthCheckContext context, CancellationToken cancellationToken) 383public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 407public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 472public 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 (9)
34Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default); 46Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default); 60Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default); 73Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default); 86Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default); 98Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default); 125Task<InteractionResult<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default); 580public Task<byte[]> ReadAllBytesAsync(CancellationToken cancellationToken = default) 588private static async Task<byte[]> ReadAllBytesAsyncCore(Stream stream, CancellationToken cancellationToken)
InteractionService.cs (9)
90public async Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 100public async Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 109private async Task<InteractionResult<bool>> PromptMessageBoxCoreAsync(string title, string message, MessageBoxInteractionOptions options, CancellationToken cancellationToken) 138public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 143public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 154public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 263public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 291public async Task<InteractionResult<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default) 542private async Task<bool> RunValidationAsync(Interaction interactionState, InteractionCompletionState result, CancellationToken cancellationToken)
Orchestrator\ApplicationOrchestrator.cs (1)
153var waitForNonWaitingStateTask = _notificationService.WaitForResourceAsync(
Orchestrator\ParameterProcessor.cs (2)
429internal async Task<ExecuteCommandResult> SetParameterCoreAsync(ParameterResource parameterResource, InteractionInputCollection arguments, CancellationToken cancellationToken) 446internal async Task<ExecuteCommandResult> DeleteParameterCoreAsync(ParameterResource parameterResource, InteractionInputCollection arguments, CancellationToken cancellationToken)
Pipelines\DistributedApplicationPipeline.cs (2)
623internal async Task<List<PipelineStep>> ResolveStepsAsync(PipelineContext context) 741private static async Task<List<PipelineStep>> CollectStepsFromAnnotationsAsync(PipelineContext context)
Pipelines\IDeploymentStateManager.cs (2)
26Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default); 38Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default)
Pipelines\Internal\DeploymentStateManagerBase.cs (6)
74protected async Task<JsonObject> LoadStateAsync(CancellationToken cancellationToken = default) 98protected virtual Task<JsonObject> LoadStateFromStorageAsync(CancellationToken cancellationToken = default) => 104protected static async Task<JsonObject> LoadStateFileAsync(string? statePath, CancellationToken cancellationToken) 172public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) => 176public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) => 179private async Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, bool includeLegacyState, CancellationToken cancellationToken)
Pipelines\Internal\FileDeploymentStateManager.cs (5)
91internal static async Task<JsonObject> LoadEffectiveStateAsync( 230protected override async Task<JsonObject> LoadStateFromStorageAsync(CancellationToken cancellationToken = default) 485private static async Task<FileLock> AcquireStateLockAsync( 691private async Task<bool> LoadMigrationStateAsync(string? canonicalStatePath, CancellationToken cancellationToken) 724private static async Task<MigrationState> LoadMigrationStateFileAsync(
Pipelines\IPipelineActivityReporter.cs (2)
20Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default); 30Task<IReportingStep> CreateStepAsync(string title, string? parentStepId, int hierarchyLevel, 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 (3)
57public async Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 62public async Task<IReportingStep> CreateStepAsync(string title, string? parentStepId, int hierarchyLevel, CancellationToken cancellationToken = default) 82public 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)
106public async Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 117public async Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Publishing\ContainerRuntimeBase.cs (9)
49public abstract Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken); 100public virtual async Task<ContainerImageConfigInspectionResult> InspectImageConfigAsync(string imageName, CancellationToken cancellationToken) 144public virtual async Task<ContainerImageManifestInspectionResult> InspectImageManifestAsync(string imageName, CancellationToken cancellationToken) 432protected async Task<int> ExecuteContainerCommandWithExitCodeAsync( 508protected async Task<ProcessResult> ExecuteContainerCommandWithResultAsync( 550protected async Task<string> ExecuteContainerCommandForOutputAsync( 565protected async Task<string> ExecuteContainerCommandForOutputAsync( 580private async Task<string> ExecuteContainerCommandForOutputAsync( 750public virtual async Task<IReadOnlyList<ComposeServiceInfo>?> ComposeListServicesAsync(ComposeOperationContext context, CancellationToken cancellationToken)
Publishing\ContainerRuntimeResolver.cs (4)
24private Task<IContainerRuntime>? _cachedTask; 36public Task<IContainerRuntime> ResolveAsync(CancellationToken cancellationToken = default) 47var task = _cachedTask; 66private async Task<IContainerRuntime> ResolveInternalAsync(CancellationToken cancellationToken)
Publishing\DockerContainerRuntime.cs (4)
151public override async Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken) 156private async Task<bool> CheckDockerDaemonAsync(CancellationToken cancellationToken) 175private async Task<bool> CheckDockerBuildxAsync(CancellationToken cancellationToken) 215private async Task<int> RemoveBuildkitInstanceAsync(string builderName, CancellationToken cancellationToken)
Publishing\IContainerRuntime.cs (4)
25Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken); 92Task<IReadOnlyList<ComposeServiceInfo>?> ComposeListServicesAsync(ComposeOperationContext context, CancellationToken cancellationToken); 100Task<ContainerImageConfigInspectionResult> InspectImageConfigAsync(string imageName, CancellationToken cancellationToken) 109Task<ContainerImageManifestInspectionResult> InspectImageManifestAsync(string imageName, CancellationToken cancellationToken)
Publishing\IContainerRuntimeResolver.cs (1)
21Task<IContainerRuntime> ResolveAsync(CancellationToken cancellationToken = default);
Publishing\PipelineExecutor.cs (1)
111public async Task<PipelineSummary> ExecutePipelineAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
Publishing\PodmanContainerRuntime.cs (3)
29public override async Task<IReadOnlyList<ComposeServiceInfo>?> ComposeListServicesAsync(ComposeOperationContext context, CancellationToken cancellationToken) 296public override async Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken) 315public override async Task<ContainerImageManifestInspectionResult> InspectImageManifestAsync(string imageName, CancellationToken cancellationToken)
Publishing\PublishingExtensions.cs (14)
24public static async Task<IReportingStep> SucceedAsync( 41public static async Task<IReportingStep> SucceedAsync( 57public static async Task<IReportingStep> WarnAsync( 74public static async Task<IReportingStep> WarnAsync( 90public static async Task<IReportingStep> FailAsync( 107public static async Task<IReportingStep> FailAsync( 123public static async Task<IReportingTask> UpdateStatusAsync( 139public static async Task<IReportingTask> UpdateStatusAsync( 155public static async Task<IReportingTask> SucceedAsync( 171public static async Task<IReportingTask> SucceedAsync( 187public static async Task<IReportingTask> WarnAsync( 203public static async Task<IReportingTask> WarnAsync( 219public static async Task<IReportingTask> FailAsync( 235public static async Task<IReportingTask> FailAsync(
Publishing\ResourceContainerImageManager.cs (4)
171private async Task<IContainerRuntime> GetContainerRuntimeAsync(CancellationToken cancellationToken) 184private async Task<ResolvedContainerBuildOptions> ResolveContainerBuildOptionsAsync( 520internal static async Task<string?> ResolveValue(object? value, CancellationToken cancellationToken) 550private async Task<bool> ResourcesRequireContainerRuntimeAsync(IEnumerable<IResource> resources, CancellationToken cancellationToken)
RequiredCommandResourceExtensions.cs (1)
68Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>> validationCallback,
ResourceBuilderExtensions.cs (8)
2916Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 2980Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 3264Func<ExecuteCommandContext, Task<ProcessCommandSpecExportData>> createProcessSpec, 3283internal static async Task<ExecuteCommandResult> ExecuteProcessCommandAsync(ExecuteCommandContext context, ProcessCommandSpec processCommandSpec, ProcessCommandOptions commandOptions) 3461private static async Task<ExecuteCommandResult> GetProcessCommandResultAsync(ExecuteCommandContext context, ProcessCommandSpec processCommandSpec, ProcessResult processResult, ProcessCommandOptions commandOptions) 3872internal static async Task<ExecuteCommandResult> GetDefaultHttpCommandResultAsync(HttpResponseMessage response, HttpCommandOptions commandOptions, CancellationToken cancellationToken) 4940Func<string, CancellationToken, Task<TLaunchConfiguration>> launchConfigurationProducer, 4997Func<LaunchConfigurationCallbackContext, Task<TLaunchConfiguration>> launchConfigurationProducer,
src\Shared\ContainerRuntimeDetector.cs (4)
110public static async Task<ContainerRuntimeInfo?> FindAvailableRuntimeAsync(string? configuredRuntime = null, ILogger? logger = null, CancellationToken cancellationToken = default) 135public static async Task<ContainerRuntimeInfo> CheckRuntimeAsync(string executable, string name, bool isDefault, ILogger? logger = null, CancellationToken cancellationToken = default) 248private static async Task<bool> IsCliInstalledAsync(string executable, CancellationToken cancellationToken) 325private static async Task<RuntimeVersionInfo> GetVersionInfoAsync(string executable, CancellationToken cancellationToken)
src\Shared\FileLock.cs (1)
106public static async Task<FileLock> AcquireAsync(string lockPath, CancellationToken cancellationToken = default, TimeSpan? timeout = null)
SupportsDebuggingAnnotation.cs (4)
24Func<LaunchConfigurationCallbackContext, Task<object>> launchConfigurationProducer) 48internal Func<LaunchConfigurationCallbackContext, Task<object>> LaunchConfigurationProducer { get; } 53Func<LaunchConfigurationCallbackContext, Task<T>> launchConfigurationProducer) 61async Task<T> ProduceAsync(LaunchConfigurationCallbackContext context)
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 (151)
AcrLoginService.cs (1)
140private async Task<string> ExchangeAadTokenForAcrRefreshTokenAsync(
AzureProvisioningController.cs (73)
563public async Task<bool> ChangeAzureContextAsync(DistributedApplicationModel model, CancellationToken cancellationToken = default) 570private async Task<bool> ChangeAzureContextAsync(DistributedApplicationModel model, AzureProvisioningOptionsUpdate options, CancellationToken cancellationToken) 585public async Task<bool> ReprovisionAllAsync(DistributedApplicationModel model, CancellationToken cancellationToken = default) 630public async Task<bool> ReprovisionResourceAsync(DistributedApplicationModel model, string resourceName, CancellationToken cancellationToken = default) 654public async Task<bool> ChangeResourceLocationAsync(DistributedApplicationModel model, string resourceName, CancellationToken cancellationToken = default) 710private async Task<bool> ChangeResourceLocationAsync( 731private Task<ExecuteCommandResult> ExecuteResetProvisioningStateCommandAsync(ExecuteCommandContext context) 744private Task<ExecuteCommandResult> ExecuteChangeAzureContextCommandAsync(ExecuteCommandContext context) 757private Task<ExecuteCommandResult> ExecuteReprovisionAllCommandAsync(ExecuteCommandContext context) 770private Task<ExecuteCommandResult> ExecuteDeleteAzureResourcesCommandAsync(ExecuteCommandContext context) 782private Task<ExecuteCommandResult> ExecuteChangeResourceLocationCommandAsync(string resourceName, ExecuteCommandContext context) 796private Task<ExecuteCommandResult> ExecuteGetAzureResourceCommandAsync(string resourceName, ExecuteCommandContext context) 809private Task<ExecuteCommandResult> ExecuteCancelCommandAsync(string resourceName, ExecuteCommandContext context) 822private Task<ExecuteCommandResult> ExecuteDeleteAzureResourceCommandAsync(string resourceName, ExecuteCommandContext context) 835private Task<ExecuteCommandResult> ExecuteForgetStateCommandAsync(string resourceName, ExecuteCommandContext context) 848private Task<ExecuteCommandResult> ExecuteReprovisionResourceCommandAsync(string resourceName, ExecuteCommandContext context) 862private async Task<bool> ChangeAzureContextCommandAsync(DistributedApplicationModel model, InteractionInputCollection arguments, CancellationToken cancellationToken) 892private Task<bool> ChangeResourceLocationCommandAsync(DistributedApplicationModel model, string resourceName, InteractionInputCollection arguments, CancellationToken cancellationToken) 1016private async Task<T> RunOperationAsync<T>(DistributedApplicationModel model, AzureIntent intent, CancellationToken cancellationToken) 1024private async Task<bool> EnsureProvisionedCoreAsync( 1127private async Task<bool> EnsureProvisionedOrThrowAsync( 1389private async Task<object?> QueueAndWaitForOperationAsync( 1704private async Task<object?> ExecuteIntentAsync(DistributedApplicationModel model, AzureIntent intent, CancellationToken cancellationToken) 1723private async Task<bool> ExecuteResetStateAsync(DistributedApplicationModel model, ResetStateIntent intent, CancellationToken cancellationToken) 1745private async Task<object?> ExecuteForgetResourceStateAsync(DistributedApplicationModel model, ForgetResourceStateIntent intent, CancellationToken cancellationToken) 1756private async Task<bool> ExecuteChangeAzureContextAsync(DistributedApplicationModel model, ChangeAzureContextIntent intent, CancellationToken cancellationToken) 1788private async Task<bool> ExecuteApplyAzureContextAsync(DistributedApplicationModel model, CancellationToken cancellationToken) 1798private async Task<object?> ExecuteEnsureProvisionedAsync(DistributedApplicationModel model, CancellationToken cancellationToken) 1806private async Task<bool> ExecuteReprovisionAllAsync(DistributedApplicationModel model, CancellationToken cancellationToken) 1814private async Task<object?> ExecuteDeleteAzureResourcesAsync(DistributedApplicationModel model, CancellationToken cancellationToken) 1854private async Task<string?> DeleteCurrentResourceGroupIfExistsAsync(CancellationToken cancellationToken) 1885private async Task<bool> ExecuteChangeResourceLocationAsync(DistributedApplicationModel model, ChangeResourceLocationIntent intent, CancellationToken cancellationToken) 1937private async Task<bool> ExecuteReprovisionResourceAsync(DistributedApplicationModel model, ReprovisionResourceIntent intent, CancellationToken cancellationToken) 2088private async Task<DeleteAzureResourceResult> ExecuteDeleteAzureResourceAsync(DistributedApplicationModel model, DeleteAzureResourceIntent intent, CancellationToken cancellationToken) 2155private async Task<object?> ExecuteDetectDriftAsync(DistributedApplicationModel model, CancellationToken cancellationToken) 2376private static async Task<ExecuteCommandResult> ExecuteCommandAsync(Func<Task> action, string successMessage, Func<Task<CommandResultData>> createResultData, string? failureOperation = null) 2393private static async Task<ExecuteCommandResult> ExecuteCommandAsync<T>(Func<Task<T>> action, string successMessage, Func<T, Task<CommandResultData>> createResultData, string? failureOperation = null) 2410private static async Task<ExecuteCommandResult> ExecuteCommandAsync(Func<Task<bool>> action, string successMessage, Func<Task<CommandResultData>> createResultData, string? failureOperation = null) 2428private async Task<CommandResultData> CreateEnvironmentCommandResultDataAsync(string commandName, DistributedApplicationModel model, CancellationToken cancellationToken) 2445private async Task<CommandResultData> CreateResourceCommandResultDataAsync(string commandName, DistributedApplicationModel model, string resourceName, CancellationToken cancellationToken) 2448private async Task<CommandResultData> CreateDeleteAzureResourceCommandResultDataAsync(DistributedApplicationModel model, string resourceName, DeleteAzureResourceResult result, CancellationToken cancellationToken) 2462private async Task<JsonObject> CreateResourceCommandResultJsonAsync(string commandName, DistributedApplicationModel model, string resourceName, CancellationToken cancellationToken) 2476private async Task<CommandResultData> CreateAzureResourceInfoCommandResultDataAsync(DistributedApplicationModel model, string resourceName, CancellationToken cancellationToken) 2507private async Task<JsonObject> CreateCachedDeploymentStateInfoAsync(AzureBicepResource resource, AzureContextState context, CancellationToken cancellationToken) 2550private async Task<JsonObject> CreateLiveResourceInfoAsync(string? resourceId, AzureContextState context, CancellationToken cancellationToken) 2669private async Task<JsonObject> CreateCommandResultJsonAsync(string commandName, string? resourceName, CancellationToken cancellationToken) 2761private async Task<string?> GetEffectiveResourceLocationAsync(string resourceName, CancellationToken cancellationToken) 2787private async Task<int> CancelCachedDeploymentsAsync( 2888private async Task<IReadOnlyList<string>> GetAzureResourceIdsForDeletionAsync( 2965private async Task<bool> DeleteAzureResourceIdAndPurgeDeletedKeyVaultAsync( 2995private async Task<bool> PurgeDeletedKeyVaultAsync( 3065private async Task<IArmClient> GetArmClientForResourceIdAsync(string resourceId, CancellationToken cancellationToken) 3235private async Task<IReadOnlyList<KeyValuePair<string, string>>> GetLocationOptionsAsync(CancellationToken cancellationToken) 3240private async Task<IReadOnlyList<KeyValuePair<string, string>>> GetTenantOptionsAsync(CancellationToken cancellationToken) 3278private async Task<IReadOnlyList<KeyValuePair<string, string>>> GetSubscriptionOptionsAsync(string? tenantId, CancellationToken cancellationToken) 3299private async Task<IReadOnlyList<(string Name, string Location)>> GetResourceGroupOptionsAsync(string? subscriptionId, CancellationToken cancellationToken) 3323private async Task<IReadOnlyList<KeyValuePair<string, string>>> GetLocationOptionsAsync(string? subscriptionId, CancellationToken cancellationToken) 3364private async Task<AzureContextState> GetCurrentAzureContextAsync(CancellationToken cancellationToken) 3390private async Task<string?> TryGetResourceIdFromDeploymentStateAsync(AzureBicepResource resource, CancellationToken cancellationToken) 3411private async Task<LocationChangeResourceDeletion?> PrepareCachedResourceDeletionForLocationChangeAsync( 3509private async Task<string?> TryGetPersistedResourceLocationAsync(AzureBicepResource resource, CancellationToken cancellationToken) 3535private async Task<bool> IsMissingCachedResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) 3784private async Task<bool> TryPublishTerminalDeploymentStateAsync( 3853private async Task<bool> WaitForRoleAssignmentsAsync( 3893var provisioningContextLazy = new Lazy<Task<ProvisioningContext>>(() => provisioningContextProvider.CreateProvisioningContextAsync(cancellationToken)); 3906Lazy<Task<ProvisioningContext>> provisioningContextLazy, 4347Func<AzureProvisioningController, ExecuteCommandContext, Task<ExecuteCommandResult>> ExecuteCommand, 4360Func<AzureProvisioningController, string, ExecuteCommandContext, Task<ExecuteCommandResult>> ExecuteCommand,
AzureResourcePreparer.cs (1)
115Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand,
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)
91public virtual async Task<ProvisioningContext> CreateProvisioningContextAsync(CancellationToken cancellationToken = default) 249protected async Task<(List<KeyValuePair<string, string>>? tenantOptions, bool fetchSucceeded)> TryGetTenantsAsync(CancellationToken cancellationToken) 298protected async Task<(List<KeyValuePair<string, string>>? subscriptionOptions, bool fetchSucceeded)> TryGetSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken) 326protected async Task<(List<KeyValuePair<string, string>>? subscriptionOptions, bool fetchSucceeded)> TryGetSubscriptionsAsync(CancellationToken cancellationToken) 331protected async Task<(List<(string Name, string Location)>? resourceGroupOptions, bool fetchSucceeded)> TryGetResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken) 364protected 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) 96private static async Task<int> ExecuteCommand(ProcessSpec processSpec)
Provisioning\Internal\DefaultArmClientProvider.cs (12)
61public async Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 85public async Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default) 97public async Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 109public async Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default) 130public async Task<ISubscriptionResource> GetSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) 137public async Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 146public async Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken = default) 159public async Task<IEnumerable<string>> GetSupportedLocationsAsync(string subscriptionId, string resourceType, CancellationToken cancellationToken = default) 209public async Task<bool> ResourceExistsAsync(string resourceId, CancellationToken cancellationToken = default) 243public async Task<bool> PurgeDeletedKeyVaultAsync(string resourceId, string location, CancellationToken cancellationToken = default) 334public async Task<AzureDeploymentState?> GetDeploymentAsync(string deploymentId, CancellationToken cancellationToken = default) 415private async Task<AzureDeploymentOperationDetails[]> GetDeploymentOperationsForDeploymentAsync(ResourceIdentifier deploymentId, CancellationToken cancellationToken)
Provisioning\Internal\DefaultArmDeploymentCollection.cs (1)
13public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync(
Provisioning\Internal\DefaultAzurePrincipalProvider.cs (1)
26public async Task<AzurePrincipal> GetPrincipalAsync(CancellationToken cancellationToken = default)
Provisioning\Internal\DefaultResourceGroupResource.cs (1)
24public Task<ArmOperation> DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) =>
Provisioning\Internal\DefaultRoleAssignmentCollection.cs (1)
13public Task<ArmOperation<RoleAssignmentResource>> 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\IProvisioningServices.cs (25)
52Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default); 65Task<ProvisioningContext> CreateProvisioningContextAsync(CancellationToken cancellationToken = default); 79Task<bool> EnsureProvisioningOptionsAsync(bool forcePrompt, CancellationToken cancellationToken = default); 86Task<AzureProvisioningOptionsState> GetProvisioningOptionsAsync(CancellationToken cancellationToken = default); 100Task<AzureProvisioningOptionsState> ApplyProvisioningOptionsAsync(AzureProvisioningOptionsUpdate options, CancellationToken cancellationToken = default); 118public Task<bool> EnsureProvisioningOptionsAsync(bool forcePrompt, CancellationToken cancellationToken = default) => Task.FromResult(false); 119public Task<AzureProvisioningOptionsState> GetProvisioningOptionsAsync(CancellationToken cancellationToken = default) 122public Task<AzureProvisioningOptionsState> ApplyProvisioningOptionsAsync(AzureProvisioningOptionsUpdate options, CancellationToken cancellationToken = default) 134Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default); 139Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default); 144Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default); 149Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default); 154Task<ISubscriptionResource> GetSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default); 159Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default); 164Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken = default); 169Task<IEnumerable<string>> GetSupportedLocationsAsync(string subscriptionId, string resourceType, CancellationToken cancellationToken = default); 179Task<bool> ResourceExistsAsync(string resourceId, CancellationToken cancellationToken = default); 199Task<bool> PurgeDeletedKeyVaultAsync(string resourceId, string location, CancellationToken cancellationToken = default); 209Task<AzureDeploymentState?> GetDeploymentAsync(string deploymentId, CancellationToken cancellationToken = default); 264Task<Response<IResourceGroupResource>> GetAsync(string resourceGroupName, CancellationToken cancellationToken = default); 269Task<ArmOperation<IResourceGroupResource>> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceGroupName, ResourceGroupData data, CancellationToken cancellationToken = default); 295Task<ArmOperation> DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default); 312Task<ArmOperation<RoleAssignmentResource>> CreateOrUpdateAsync( 327Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 378Task<AzurePrincipal> GetPrincipalAsync(CancellationToken cancellationToken = default);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (1)
62public override async Task<ProvisioningContext> CreateProvisioningContextAsync(CancellationToken cancellationToken = default)
Provisioning\Internal\RunModeProvisioningContextProvider.cs (5)
69public async Task<bool> EnsureProvisioningOptionsAsync(bool forcePrompt, CancellationToken cancellationToken = default) 123public override async Task<ProvisioningContext> CreateProvisioningContextAsync(CancellationToken cancellationToken = default) 152public async Task<AzureProvisioningOptionsState> ApplyProvisioningOptionsAsync(AzureProvisioningOptionsUpdate options, CancellationToken cancellationToken = default) 198public async Task<AzureProvisioningOptionsState> GetProvisioningOptionsAsync(CancellationToken cancellationToken = default) 274private async Task<bool> RetrieveAzureProvisioningOptionsAsync(bool forcePrompt, CancellationToken cancellationToken = default)
Provisioning\Provisioners\BicepProvisioner.cs (13)
52public async Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) 164public async Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 259private async Task<AzureDeploymentState?> WaitForCachedRunningDeploymentAsync( 349private async Task<bool> ConfigureSucceededReconciledDeploymentAsync( 392private async Task<bool> TryApplyTerminalReconciledDeploymentStateAsync( 845private async Task<bool> TryAdoptActiveDeploymentConflictAsync( 956private async Task<AzureDeploymentOperationSummary> PublishDeploymentOperationSummaryAsync( 1006private async Task<AzureDeploymentOperationSummary> GetDeploymentOperationSummaryAsync( 1017var enrichmentTasks = new List<(int OperationIndex, Task<AzureProvisioningFailureDetails> EnrichmentTask)>(); 1079private async Task<AzureProvisioningFailureDetails> EnrichFailureDetailsAsync( 1283private static async Task<string> ResolveScopeValueAsync(object scopeValue, CancellationToken cancellationToken) 1293private async Task<bool> TryCancelDeploymentAsync(IArmDeploymentCollection deployments, string deploymentName, ILogger resourceLogger, bool treatMissingOrInactiveAsCanceled) 1474private async Task<AzureContextState> GetCurrentAzureContextAsync(ResourceIdentifier? deploymentId, CancellationToken cancellationToken)
Provisioning\Provisioners\IBicepProvisioner.cs (2)
17Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken); 26Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken);
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
22public static (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
Aspire.Hosting.Azure.AppContainers (2)
ContainerAppEnvironmentContext.cs (1)
72public async Task<AzureBicepResource> CreateContainerAppAsync(IResource resource, AzureProvisioningOptions provisioningOptions, CancellationToken cancellationToken)
ContainerAppUrls.cs (1)
15internal static async Task<MarkdownString> GetPortalLinkAsync(AzureContainerAppEnvironmentResource containerAppEnv, string containerAppName, CancellationToken cancellationToken)
Aspire.Hosting.Azure.AppService (3)
AppSvcUrls.cs (1)
16internal static async Task<MarkdownString> GetPortalLinkAsync(AzureAppServiceEnvironmentResource computerEnv, string siteName, string? deploymentSlot, CancellationToken cancellationToken)
AzureAppServiceEnvironmentContext.cs (1)
72public async Task<AzureBicepResource> CreateAppServiceAsync(IResource resource, AzureProvisioningOptions provisioningOptions, CancellationToken cancellationToken)
AzureAppServiceWebSiteResource.cs (1)
111private async Task<string> GetAppServiceWebsiteBaseNameAsync(PipelineStepContext context)
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.Kubernetes (13)
AzureKubernetesEnvironmentResource.AksPipeline.cs (12)
35internal Func<string, string, ILogger, Task<AzCommandResult>>? AzCommandRunnerForTesting { get; set; } 265Task<AzCommandResult> RunAzAsync(string path, string arguments) 774internal static async Task<(string? SubscriptionId, string? ResourceGroup)> TryGetAzureDeploymentStateAsync( 800internal static async Task<string?> ResolveScopeValueAsync(object? value, CancellationToken cancellationToken) 824internal static async Task<(string SubscriptionId, string? ResourceGroup)> ResolveDeploymentScopeAsync( 884internal static async Task<string> GetResourceGroupAsync( 890Func<string, string, Task<AzCommandResult>> runAzCommandAsync) 947internal static async Task<string> FetchKubeConfigAsync( 952Func<string, string, Task<AzCommandResult>> runAzCommandAsync) 967internal static async Task<bool> AksResourceExistsAsync( 972Func<string, string, Task<AzCommandResult>> runAzCommandAsync) 1016private static async Task<AzCommandResult> RunAzCommandAsync(
AzureKubernetesEnvironmentResource.cs (1)
165private static async Task<bool> HasPersistedKubernetesCleanupStateAsync(
Aspire.Hosting.Azure.Kubernetes.Tests (7)
AzureKubernetesInfrastructureTests.cs (1)
309async Task<TestPipelineActivityReporter> RunDestroyAsync()
tests\Shared\FakeHelmRunner.cs (1)
45public Task<int> RunAsync(
tests\Shared\InMemoryDeploymentStateManager.cs (1)
27public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
tests\Shared\TestPipelineActivityReporter.cs (4)
157public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 161public Task<IReportingStep> CreateStepAsync(string title, string? parentStepId, int hierarchyLevel, CancellationToken cancellationToken = default) 205public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 244public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.Kusto (5)
AzureKustoBuilderExtensions.cs (2)
379static async Task<ExecuteCommandResult> OnOpenInKustoExplorerDesktop(IResourceBuilder<AzureKustoClusterResource> resourceBuilder, ExecuteCommandContext context) 394static 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)
433public static async Task<Dictionary<string, object>> GetEnvironmentVariables(this IDistributedApplicationTestingBuilder builder, EnvironmentCallbackAnnotation annotation) 441public 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.Sandboxes (44)
AzureSandboxContainerDeployment.cs (20)
639private static async Task<AzureDevComputeDiskImage> CreateDiskImageAsync( 669internal static async Task<string?> ResolveImagePullManagedIdentityClientIdAsync( 695private static async Task<AzureDevComputeDiskImage> WaitForDiskImageReadyAsync( 735private static Task<AzureDevComputeSandbox> CreateSandboxAsync( 843internal static async Task<FileLock?> AcquireDeploymentLeaseAsync( 931private static async Task<AzureDevComputeSandboxPort> AddPortAsync( 972private static async Task<string> ResolveContainerImageAsync(PipelineStepContext context, AzureSandboxContainerResource resource) 991private static async Task<string> ResolveContainerImageReferenceForDiskImageAsync(PipelineStepContext context, string imageReference) 1000internal static async Task<string> ResolveContainerImageReferenceForDiskImageAsync( 1045private static async Task<ContainerImageMetadata> ResolveContainerImageMetadataAsync(PipelineStepContext context, IResource resource, string imageReference) 1067internal static async Task<ResolvedModeledCommand> ResolveModeledCommandAsync(PipelineStepContext context, IResource resource) 1105private static async Task<ContainerImageMetadata> InspectLocalContainerImageAsync(PipelineStepContext context, string imageReference) 1134private static Task<IContainerRuntime> ResolveContainerRuntimeAsync(PipelineStepContext context) 1139internal static async Task<ResolvedEnvironmentVariables> ResolveEnvironmentVariablesAsync(PipelineStepContext context, IResource resource) 1167internal static async Task<string> ResolveValueAsync(PipelineStepContext context, IResource resource, object? value) 1170internal static async Task<ResolvedValue> ResolveValueWithEgressHostsAsync(PipelineStepContext context, IResource resource, object? value) 1218static async Task<ResolvedValue> ResolveEndpointValueAsync( 1250static async Task<ResolvedValue> ResolveReferenceExpressionAsync( 1769internal static async Task<T> CreateWithResponseLossCleanupAsync<T>( 1770Func<Task<T>> createResource,
Internal\Adc\AzureDevComputeClient.cs (23)
19Task<AzureDevComputeDiskImage> CreateDiskImageAsync(AzureDevComputeResourceScope scope, AzureDevComputeCreateDiskImageRequest request, CancellationToken cancellationToken); 21Task<List<AzureDevComputeDiskImage>> ListDiskImagesAsync(AzureDevComputeResourceScope scope, string? labels, CancellationToken cancellationToken); 23Task<AzureDevComputeDiskImage> GetDiskImageAsync(AzureDevComputeResourceScope scope, string diskImageId, CancellationToken cancellationToken); 27Task<List<AzureDevComputeSandbox>> ListSandboxesAsync(AzureDevComputeResourceScope scope, string? labels, CancellationToken cancellationToken); 29Task<AzureDevComputeSandbox> CreateSandboxAsync(AzureDevComputeResourceScope scope, AzureDevComputeSandboxRequest request, CancellationToken cancellationToken); 31Task<AzureDevComputeSandbox> SetLifecycleAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeSandboxLifecyclePolicy lifecycle, CancellationToken cancellationToken); 33Task<List<AzureDevComputeSandboxPort>> AddPortAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeAddPortRequest request, CancellationToken cancellationToken); 35Task<List<AzureDevComputeSandboxPort>> RemovePortAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeRemovePortRequest request, CancellationToken cancellationToken); 60public Task<AzureDevComputeDiskImage> CreateDiskImageAsync(AzureDevComputeResourceScope scope, AzureDevComputeCreateDiskImageRequest request, CancellationToken cancellationToken) 70public Task<List<AzureDevComputeDiskImage>> ListDiskImagesAsync(AzureDevComputeResourceScope scope, string? labels, CancellationToken cancellationToken) 75public Task<AzureDevComputeDiskImage> GetDiskImageAsync(AzureDevComputeResourceScope scope, string diskImageId, CancellationToken cancellationToken) 96public Task<List<AzureDevComputeSandbox>> ListSandboxesAsync(AzureDevComputeResourceScope scope, string? labels, CancellationToken cancellationToken) 101public Task<AzureDevComputeSandbox> CreateSandboxAsync(AzureDevComputeResourceScope scope, AzureDevComputeSandboxRequest request, CancellationToken cancellationToken) 111public Task<AzureDevComputeSandbox> SetLifecycleAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeSandboxLifecyclePolicy lifecycle, CancellationToken cancellationToken) 121public async Task<List<AzureDevComputeSandboxPort>> AddPortAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeAddPortRequest request, CancellationToken cancellationToken) 133public async Task<List<AzureDevComputeSandboxPort>> RemovePortAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeRemovePortRequest request, CancellationToken cancellationToken) 157private async Task<List<T>> ListAllPagesAsync<T>(AzureDevComputeResourceScope scope, string resourceType, string? labels, CancellationToken cancellationToken) 200private async Task<T> SendAsync<T>( 220private async Task<T> SendCreateAsync<T>( 295private async Task<HttpResponseMessage> SendWithRetryAsync( 412private async Task<HttpResponseMessage> SendCoreAsync( 442private async Task<string> GetAccessTokenAsync(CancellationToken cancellationToken) 468private static Task<string> GetErrorMessageAsync(HttpResponseMessage response, CancellationToken cancellationToken)
src\Shared\FileLock.cs (1)
106public static async Task<FileLock> AcquireAsync(string lockPath, CancellationToken cancellationToken = default, TimeSpan? timeout = null)
Aspire.Hosting.Azure.Tests (231)
AcrLoginServiceTests.cs (2)
117private sealed class CallbackHttpMessageHandler(Func<int, CancellationToken, Task<HttpResponseMessage>> callback) : HttpMessageHandler 121protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
AzureAppServiceTests.cs (2)
1398private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) => 1401private static async Task<List<PipelineStep>> CreateStepsAsync(DistributedApplication app, AzureAppServiceEnvironmentResource resource)
AzureBicepProvisionerTests.cs (15)
269public Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default) 1820private static async Task<IReadOnlyList<(string Content, bool IsErrorMessage)>> ReadInitialResourceLogsAsync(ResourceLoggerService loggerService, IResource resource) 1903public Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default) 1948public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1953public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1976public Task<ArmOperation> DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) => 1997public Task<ArmOperation> DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) 2025public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 2066public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 2081public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 2101public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 2120public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 2169public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 2188public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 2204public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync(
AzureContainerAppEnvironmentExtensionsTests.cs (1)
358static async Task<string> GetIdentityBicepAsync(bool useCompactNaming)
AzureContainerAppsTests.cs (2)
1781private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) => 3187private static async Task<List<PipelineStep>> CreateStepsAsync(DistributedApplication app, AzureContainerAppEnvironmentResource resource)
AzureDeployerTests.cs (6)
1533public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1536public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1548public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) 1558public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 1566public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) 1583public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken)
AzureEnvironmentResourceExtensionsTests.cs (112)
410var commandTask = resetCommand.ExecuteCommand(new ExecuteCommandContext 516var outputTask = storage.GetOutput("blobEndpoint").GetValueAsync(CancellationToken.None).AsTask(); 1546var activeReprovisionTask = controller.ReprovisionResourceAsync(model, storage.Resource.Name, CancellationToken.None); 1605var activeReprovisionTask = controller.ReprovisionResourceAsync(model, storage1.Resource.Name, CancellationToken.None); 1612var queuedReprovisionTask = queuedReprovisionCommand.ExecuteCommand(new ExecuteCommandContext 1957var commandTask = deleteCommand.ExecuteCommand(new ExecuteCommandContext 2035var deleteTask = deleteCommand.ExecuteCommand(new ExecuteCommandContext 2232var commandTask = reprovisionCommand.ExecuteCommand(new ExecuteCommandContext 2292var commandTask = reprovisionCommand.ExecuteCommand(new ExecuteCommandContext 2369var storageTask = reprovisionStorageCommand.ExecuteCommand(new ExecuteCommandContext 2383var storage2Task = reprovisionStorage2Command.ExecuteCommand(new ExecuteCommandContext 2446var commandTask = reprovisionCommand.ExecuteCommand(new ExecuteCommandContext 2643var commandTask = reprovisionCommand.ExecuteCommand(new ExecuteCommandContext 2710var commandTask = changeLocationCommand.ExecuteCommand(new ExecuteCommandContext 2783var executionTask = changeLocationCommand.ExecuteCommand(new ExecuteCommandContext 2957var executionTask = changeLocationCommand.ExecuteCommand(new ExecuteCommandContext 3088var executionTask = changeLocationCommand.ExecuteCommand(new ExecuteCommandContext 3214var executionTask = changeLocationCommand.ExecuteCommand(new ExecuteCommandContext 3277var executionTask = changeLocationCommand.ExecuteCommand(new ExecuteCommandContext 4073var commandTask = reprovisionCommand.ExecuteCommand(new ExecuteCommandContext 4125var executionTask = changeLocationCommand.ExecuteCommand(new ExecuteCommandContext 5180private static async Task<(IReadOnlyList<PipelineStep> Steps, PipelineContext PipelineContext)> CreateAzureEnvironmentPipelineStepsAsync( 5243public Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 5250public Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default) 5256public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 5262public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default) 5272public Task<ISubscriptionResource> GetSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) 5280public Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 5285public Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken = default) 5295public Task<IEnumerable<string>> GetSupportedLocationsAsync(string subscriptionId, string resourceType, CancellationToken cancellationToken = default) 5301public Task<bool> ResourceExistsAsync(string resourceId, CancellationToken cancellationToken = default) 5307public Task<bool> PurgeDeletedKeyVaultAsync(string resourceId, string location, CancellationToken cancellationToken = default) 5313public Task<AzureDeploymentState?> GetDeploymentAsync(string deploymentId, CancellationToken cancellationToken = default) 5374public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 5386public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 5471public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) 5497public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 5507public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) 5520public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 5540public Task<ProvisioningContext> CreateProvisioningContextAsync(CancellationToken cancellationToken = default) 5549public Task<bool> EnsureProvisioningOptionsAsync(bool forcePrompt, CancellationToken cancellationToken = default) => Task.FromResult(true); 5551public async Task<AzureProvisioningOptionsState> GetProvisioningOptionsAsync(CancellationToken cancellationToken = default) 5563public async Task<AzureProvisioningOptionsState> ApplyProvisioningOptionsAsync(AzureProvisioningOptionsUpdate options, CancellationToken cancellationToken = default) 5602public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) => Task.FromResult(false); 5604public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 5632public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) => Task.FromResult(false); 5634public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 5652public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) => Task.FromResult(false); 5654public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 5669public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) => Task.FromResult(false); 5671public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 5686public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) => Task.FromResult(false); 5688public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 5712public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) => Task.FromResult(false); 5714public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 5768public Task<bool> ConfigureResourceAsync(AzureBicepResource resource, CancellationToken cancellationToken) 5771public Task<bool> ReconcileDeploymentStateAsync(AzureBicepResource resource, ProvisioningContext context, CancellationToken cancellationToken) 5820public Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 5823public Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default) 5826public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 5829public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default) 5832public Task<ISubscriptionResource> GetSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) 5835public Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 5838public Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken = default) 5841public Task<IEnumerable<string>> GetSupportedLocationsAsync(string subscriptionId, string resourceType, CancellationToken cancellationToken = default) 5847public Task<bool> ResourceExistsAsync(string resourceId, CancellationToken cancellationToken = default) 5853public Task<bool> PurgeDeletedKeyVaultAsync(string resourceId, string location, CancellationToken cancellationToken = default) 5859public Task<AzureDeploymentState?> GetDeploymentAsync(string deploymentId, CancellationToken cancellationToken = default) 5905public Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 5908public Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default) 5911public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 5914public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default) 5917public Task<ISubscriptionResource> GetSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) 5920public Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 5923public Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken = default) 5926public Task<IEnumerable<string>> GetSupportedLocationsAsync(string subscriptionId, string resourceType, CancellationToken cancellationToken = default) 5932public Task<bool> ResourceExistsAsync(string resourceId, CancellationToken cancellationToken = default) 5946public Task<bool> PurgeDeletedKeyVaultAsync(string resourceId, string location, CancellationToken cancellationToken = default) 5952public Task<AzureDeploymentState?> GetDeploymentAsync(string deploymentId, CancellationToken cancellationToken = default) 5982public Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 5985public Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default) 5988public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 5991public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default) 5994public Task<ISubscriptionResource> GetSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) 5997public Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 6000public Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken = default) 6003public Task<IEnumerable<string>> GetSupportedLocationsAsync(string subscriptionId, string resourceType, CancellationToken cancellationToken = default) 6009public Task<bool> ResourceExistsAsync(string resourceId, CancellationToken cancellationToken = default) 6015public Task<bool> PurgeDeletedKeyVaultAsync(string resourceId, string location, CancellationToken cancellationToken = default) 6021public Task<AzureDeploymentState?> GetDeploymentAsync(string deploymentId, CancellationToken cancellationToken = default) 6050public Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 6053public Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default) 6056public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 6059public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default) 6062public Task<ISubscriptionResource> GetSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) 6065public Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 6068public Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken = default) 6071public Task<IEnumerable<string>> GetSupportedLocationsAsync(string subscriptionId, string resourceType, CancellationToken cancellationToken = default) 6077public Task<bool> ResourceExistsAsync(string resourceId, CancellationToken cancellationToken = default) 6083public Task<bool> PurgeDeletedKeyVaultAsync(string resourceId, string location, CancellationToken cancellationToken = default) 6089public Task<AzureDeploymentState?> GetDeploymentAsync(string deploymentId, CancellationToken cancellationToken = default) 6112public Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 6115public Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default) 6118public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 6121public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default) 6124public Task<ISubscriptionResource> GetSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) 6127public Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 6130public Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken = default) 6133public Task<IEnumerable<string>> GetSupportedLocationsAsync(string subscriptionId, string resourceType, CancellationToken cancellationToken = default) 6139public Task<bool> ResourceExistsAsync(string resourceId, CancellationToken cancellationToken = default) 6147public Task<bool> PurgeDeletedKeyVaultAsync(string resourceId, string location, CancellationToken cancellationToken = default) 6153public Task<AzureDeploymentState?> GetDeploymentAsync(string deploymentId, CancellationToken cancellationToken = default)
AzureEnvironmentResourceTests.cs (1)
330private async Task<AzurePublishingContext> CreatePublishingContextAsync(DistributedApplication app, string outputPath)
AzureFunctionsTests.cs (1)
457private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
AzureManifestUtils.cs (3)
16public static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource, bool skipPreparer = false) => 19public static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(DistributedApplicationModel appModel, IResource resource) => 22private static async Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(DistributedApplicationModel appModel, IResource resource, bool skipPreparer)
AzureSandboxesTests.cs (32)
3227var secondLeaseTask = AzureSandboxContainerDeployment.AcquireDeploymentLeaseAsync( 3247private static async Task<List<PipelineStep>> CreateStepsAsync( 3281private static async Task<ResponseLossCleanupClient> RunCreateResponseLossAsync( 3359public Task<List<AzureDevComputeSandbox>> ListSandboxesAsync( 3387public Task<List<AzureDevComputeDiskImage>> ListDiskImagesAsync( 3395public Task<AzureDevComputeDiskImage> CreateDiskImageAsync(AzureDevComputeResourceScope scope, AzureDevComputeCreateDiskImageRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3396public Task<AzureDevComputeDiskImage> GetDiskImageAsync(AzureDevComputeResourceScope scope, string diskImageId, CancellationToken cancellationToken) => throw new NotSupportedException(); 3398public Task<AzureDevComputeSandbox> CreateSandboxAsync(AzureDevComputeResourceScope scope, AzureDevComputeSandboxRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3399public Task<AzureDevComputeSandbox> SetLifecycleAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeSandboxLifecyclePolicy lifecycle, CancellationToken cancellationToken) => throw new NotSupportedException(); 3400public Task<List<AzureDevComputeSandboxPort>> AddPortAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeAddPortRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3401public Task<List<AzureDevComputeSandboxPort>> RemovePortAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeRemovePortRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3425public Task<string> CreateResourceThenLoseResponseAsync() 3433public Task<List<AzureDevComputeSandbox>> ListSandboxesAsync( 3461public Task<List<AzureDevComputeDiskImage>> ListDiskImagesAsync( 3503public Task<AzureDevComputeDiskImage> CreateDiskImageAsync(AzureDevComputeResourceScope scope, AzureDevComputeCreateDiskImageRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3504public Task<AzureDevComputeDiskImage> GetDiskImageAsync(AzureDevComputeResourceScope scope, string diskImageId, CancellationToken cancellationToken) => throw new NotSupportedException(); 3505public Task<AzureDevComputeSandbox> CreateSandboxAsync(AzureDevComputeResourceScope scope, AzureDevComputeSandboxRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3506public Task<AzureDevComputeSandbox> SetLifecycleAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeSandboxLifecyclePolicy lifecycle, CancellationToken cancellationToken) => throw new NotSupportedException(); 3507public Task<List<AzureDevComputeSandboxPort>> AddPortAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeAddPortRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3508public Task<List<AzureDevComputeSandboxPort>> RemovePortAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeRemovePortRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3518public Task<List<AzureDevComputeSandboxPort>> RemovePortAsync( 3536public Task<List<AzureDevComputeSandbox>> ListSandboxesAsync(AzureDevComputeResourceScope scope, string? labels, CancellationToken cancellationToken) => throw new NotSupportedException(); 3537public Task<List<AzureDevComputeDiskImage>> ListDiskImagesAsync(AzureDevComputeResourceScope scope, string? labels, CancellationToken cancellationToken) => throw new NotSupportedException(); 3538public Task<AzureDevComputeDiskImage> CreateDiskImageAsync(AzureDevComputeResourceScope scope, AzureDevComputeCreateDiskImageRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3539public Task<AzureDevComputeDiskImage> GetDiskImageAsync(AzureDevComputeResourceScope scope, string diskImageId, CancellationToken cancellationToken) => throw new NotSupportedException(); 3545public Task<AzureDevComputeSandbox> CreateSandboxAsync(AzureDevComputeResourceScope scope, AzureDevComputeSandboxRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3546public Task<AzureDevComputeSandbox> SetLifecycleAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeSandboxLifecyclePolicy lifecycle, CancellationToken cancellationToken) => throw new NotSupportedException(); 3547public Task<List<AzureDevComputeSandboxPort>> AddPortAsync(AzureDevComputeResourceScope scope, string sandboxId, AzureDevComputeAddPortRequest request, CancellationToken cancellationToken) => throw new NotSupportedException(); 3554public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) => throw new NotSupportedException(); 3560private sealed class RecordingHandler(Func<HttpRequestMessage, Task<HttpResponseMessage>> handler) : HttpMessageHandler 3562protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 3616public override Task<int> ReadAsync(
AzureSqlPrincipalReconciliationTests.cs (5)
237private async Task<SqlConnection> OpenAsync(string database) 250private async Task<string> CreateDatabaseAsync() 287private static async Task<T?> ScalarAsync<T>(SqlConnection connection, string sql) 296private async Task<PrincipalState?> GetPrincipalAsync(string database, string name) 316private async Task<string[]> GetGrantedPermissionsAsync(string database, string name)
DefaultArmClientProviderTests.cs (2)
227var purgeTask = armClient.PurgeDeletedKeyVaultAsync(KeyVaultResourceId, "westus2", CancellationToken.None); 277var purgeTask = armClient.PurgeDeletedKeyVaultAsync(KeyVaultResourceId, "westus2", CancellationToken.None);
FoundryExtensionsTests.cs (1)
979protected override Task<HttpResponseMessage> SendAsync(
ProvisioningContextProviderTests.cs (8)
341var ensureTask = provider.EnsureProvisioningOptionsAsync(forcePrompt: true, CancellationToken.None); 436var ensureTask = provider.EnsureProvisioningOptionsAsync(forcePrompt: true, CancellationToken.None); 497var ensureTask = provider.EnsureProvisioningOptionsAsync(forcePrompt: true, CancellationToken.None); 638var ensureTask = provider.EnsureProvisioningOptionsAsync(forcePrompt: true, CancellationToken.None); 684var ensureTask = provider.EnsureProvisioningOptionsAsync(forcePrompt: true, CancellationToken.None); 727var ensureTask = provider.EnsureProvisioningOptionsAsync(forcePrompt: true, CancellationToken.None); 785var ensureTask = provider.EnsureProvisioningOptionsAsync(forcePrompt: true, CancellationToken.None); 828var ensureTask = provider.EnsureProvisioningOptionsAsync(forcePrompt: true, CancellationToken.None);
ProvisioningTestHelpers.cs (24)
213private readonly Func<string, string, CancellationToken, Task<IEnumerable<string>>>? _supportedLocationsProvider; 249Func<string, string, CancellationToken, Task<IEnumerable<string>>>? supportedLocationsProvider = null) 279public Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 298public Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default) 307public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 316public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default) 328public Task<ISubscriptionResource> GetSubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) 347public Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 359public Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken = default) 370public async Task<IEnumerable<string>> GetSupportedLocationsAsync(string subscriptionId, string resourceType, CancellationToken cancellationToken = default) 389public Task<bool> ResourceExistsAsync(string resourceId, CancellationToken cancellationToken = default) 402public Task<bool> PurgeDeletedKeyVaultAsync(string resourceId, string location, CancellationToken cancellationToken = default) 419public Task<AzureDeploymentState?> GetDeploymentAsync(string deploymentId, CancellationToken cancellationToken = default) 582public Task<Response<IResourceGroupResource>> GetAsync(string resourceGroupName, CancellationToken cancellationToken = default) 607public Task<ArmOperation<IResourceGroupResource>> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceGroupName, ResourceGroupData data, CancellationToken cancellationToken = default) 670public Task<ArmOperation> DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) 701public Task<ArmOperation<RoleAssignmentResource>> CreateOrUpdateAsync( 742public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 1021public Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default) 1038public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1046public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1065public Task<AzurePrincipal> GetPrincipalAsync(CancellationToken cancellationToken = default) 1103public (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec) 1114var resultTask = Task.FromResult(result);
RoleAssignmentTests.cs (1)
373private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
tests\Shared\InMemoryDeploymentStateManager.cs (1)
27public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
tests\Shared\TestInteractionService.cs (8)
27public Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 32public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 37public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 45public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 60public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 67public async Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 76public async Task<InteractionResult<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default) 90var completionTask = data.CompletionTcs.Task;
tests\Shared\TestPipelineActivityReporter.cs (4)
157public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 161public Task<IReportingStep> CreateStepAsync(string title, string? parentStepId, int hierarchyLevel, CancellationToken cancellationToken = default) 205public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 244public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Aspire.Hosting.Blazor (8)
BlazorDotNetCliRunner.cs (2)
15public static async Task<BlazorDotNetCliResult> RunAsync( 50Task<ProcessResult> pendingResult;
BlazorGatewayExtensions.cs (2)
470private static async Task<List<AppManifestPaths>?> BuildAndDiscoverManifestsAsync( 499private static async Task<bool> PrefixAndWriteEndpointsAsync(
BlazorHostedExtensions.cs (1)
195private static async Task<string?> ResolveBlazorWasmClientProjectPathAsync(
BlazorWasmAppBuilder.cs (2)
18public static async Task<bool> BuildAsync(string projectPath, ILogger logger, CancellationToken cancellationToken) 52public static async Task<(string endpointsManifest, string runtimeManifest)?> GetManifestPathsAsync(
Manifests\EndpointsManifestTransformer.cs (1)
20public static async Task<string> PrefixEndpointsAssetFileAsync(string manifestPath, string prefix, CancellationToken ct)
Aspire.Hosting.Blazor.Tests (13)
BlazorHostedExtensionsTests.cs (3)
499private static async Task<Dictionary<string, object>> GetEnvironmentVariables( 506private static async Task<(Dictionary<string, object> Env, TestSink Sink)> GetEnvironmentVariablesWithLogs( 532private static async Task<BrowserLaunchConfiguration> CreateBrowserLaunchConfigurationAsync(IResource resource)
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)
WithBlazorAppTests.cs (1)
487private static async Task<BrowserLaunchConfiguration> CreateBrowserLaunchConfigurationAsync(IResource resource)
Aspire.Hosting.Browsers (77)
BrowserEndpointDiscovery.cs (2)
52public async Task<BrowserDebugEndpointMetadata?> TryReadAndValidateAsync(BrowserHostIdentity identity, string? profileDirectoryName, CancellationToken cancellationToken) 199private static async Task<bool> ProbeBrowserEndpointAsync(Uri browserEndpoint, CancellationToken cancellationToken)
BrowserHost.cs (6)
37public virtual async Task<IBrowserLogsCdpConnection> CreateCdpConnectionAsync( 46public Task<IBrowserPageSession> CreatePageSessionAsync( 58private async Task<IBrowserPageSession> CreatePageSessionCoreAsync( 85private readonly Task<BrowserLogsProcessResult> _processTask; 111public override Task<IBrowserLogsCdpConnection> CreateCdpConnectionAsync( 142public static async Task<OwnedBrowserHost> StartAsync(
BrowserHostRegistry.cs (5)
20private readonly Func<BrowserConfiguration, BrowserHostIdentity, BrowserLogsUserDataDirectory, CancellationToken, Task<IBrowserHost>> _createHostAsync; 41Func<BrowserConfiguration, BrowserHostIdentity, BrowserLogsUserDataDirectory, CancellationToken, Task<IBrowserHost>>? createHostAsync, 52public async Task<BrowserHostLease> AcquireAsync(BrowserConfiguration configuration, CancellationToken cancellationToken) 209private async Task<bool> TryWaitForLockAsync(CancellationToken cancellationToken) 292private async Task<IBrowserHost> CreateHostCoreAsync(
BrowserLogsArtifacts.cs (2)
12Task<BrowserLogsArtifact> WriteArtifactAsync( 42public async Task<BrowserLogsArtifact> WriteArtifactAsync(
BrowserLogsCdpConnection.cs (21)
16Task<BrowserLogsCreateTargetResult> CreateTargetAsync(CancellationToken cancellationToken); 18Task<BrowserLogsGetTargetsResult> GetTargetsAsync(CancellationToken cancellationToken); 20Task<BrowserLogsAttachToTargetResult> AttachToTargetAsync(string targetId, CancellationToken cancellationToken); 22Task<BrowserLogsCommandAck> CloseTargetAsync(string targetId, CancellationToken cancellationToken); 24Task<BrowserLogsCommandAck> EnableTargetDiscoveryAsync(CancellationToken cancellationToken); 28Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(string sessionId, CancellationToken cancellationToken); 30Task<BrowserLogsCommandAck> NavigateAsync(string sessionId, Uri url, CancellationToken cancellationToken); 67public static async Task<BrowserLogsCdpConnection> ConnectAsync( 81internal static async Task<BrowserLogsCdpConnection> ConnectAsync( 107public Task<BrowserLogsCreateTargetResult> CreateTargetAsync(CancellationToken cancellationToken) 117public Task<BrowserLogsGetTargetsResult> GetTargetsAsync(CancellationToken cancellationToken) 127public Task<BrowserLogsAttachToTargetResult> AttachToTargetAsync(string targetId, CancellationToken cancellationToken) 141public Task<BrowserLogsCommandAck> CloseTargetAsync(string targetId, CancellationToken cancellationToken) 151public Task<BrowserLogsCommandAck> EnableTargetDiscoveryAsync(CancellationToken cancellationToken) 176public Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(string sessionId, CancellationToken cancellationToken) 191public Task<BrowserLogsCommandAck> NavigateAsync(string sessionId, Uri url, CancellationToken cancellationToken) 225private async Task<TResult> SendCommandAsync<TResult>( 361public Task<TResult> Task => _taskCompletionSource.Task; 442Task<byte[]> ReceiveAsync(CancellationToken cancellationToken); 455public async Task<byte[]> ReceiveAsync(CancellationToken cancellationToken) 534public async Task<byte[]> ReceiveAsync(CancellationToken cancellationToken)
BrowserLogsCdpConnectionMultiplexer.cs (7)
143public Task<BrowserLogsCreateTargetResult> CreateTargetAsync(CancellationToken cancellationToken) 149public Task<BrowserLogsGetTargetsResult> GetTargetsAsync(CancellationToken cancellationToken) 155public Task<BrowserLogsAttachToTargetResult> AttachToTargetAsync(string targetId, CancellationToken cancellationToken) 161public Task<BrowserLogsCommandAck> CloseTargetAsync(string targetId, CancellationToken cancellationToken) 167public Task<BrowserLogsCommandAck> EnableTargetDiscoveryAsync(CancellationToken cancellationToken) 179public Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(string sessionId, CancellationToken cancellationToken) 185public Task<BrowserLogsCommandAck> NavigateAsync(string sessionId, Uri url, CancellationToken cancellationToken)
BrowserLogsConfigurationManager.cs (1)
148public async Task<ExecuteCommandResult> ConfigureAsync(BrowserLogsResource resource, InteractionInputCollection arguments, CancellationToken _)
BrowserLogsPipeBrowserProcess.cs (3)
14Task<BrowserLogsProcessResult> ProcessTask { get; } 21Task<BrowserLogsProcessResult> processTask, 35public Task<BrowserLogsProcessResult> ProcessTask { get; } = processTask;
BrowserLogsPipeBrowserProcessLauncher.Unix.cs (3)
64var processTask = WaitForPosixProcessAsync(processId); 126private static async Task<BrowserLogsProcessResult> WaitForPosixProcessAsync(int processId) 247private sealed class PosixProcessLifetime(int processId, Task<BrowserLogsProcessResult> processTask) : IBrowserLogsPipeBrowserProcessLifetime
BrowserLogsPipeBrowserProcessLauncher.Windows.cs (3)
54var processTask = WaitForWindowsProcessAsync(processHandle); 215private static async Task<BrowserLogsProcessResult> WaitForWindowsProcessAsync(SafeWaitHandle processHandle) 302private sealed class WindowsProcessLifetime(int processId, SafeWaitHandle processHandle, SafeWaitHandle? jobHandle, Task<BrowserLogsProcessResult> processTask) : IBrowserLogsPipeBrowserProcessLifetime
BrowserLogsRunningSession.cs (8)
28Task<byte[]> CaptureScreenshotAsync(CancellationToken cancellationToken); 35Task<IBrowserLogsRunningSession> StartSessionAsync( 57public async Task<IBrowserLogsRunningSession> StartSessionAsync( 100private Task<BrowserSessionResult>? _completion; 143private Task<BrowserSessionResult> Completion => _completion ?? throw new InvalidOperationException("Session has not been started."); 145public static async Task<BrowserLogsRunningSession> StartAsync( 176public async Task<byte[]> CaptureScreenshotAsync(CancellationToken cancellationToken) 275private async Task<BrowserSessionResult> MonitorAsync()
BrowserLogsSessionManager.cs (1)
184public async Task<BrowserLogsScreenshotCaptureResult> CaptureScreenshotAsync(string resourceName, CancellationToken cancellationToken)
BrowserPageSession.cs (10)
9internal delegate Task<IBrowserLogsCdpConnection> BrowserLogsCdpConnectionFactory( 44private Task<BrowserPageSessionResult>? _monitorTask; 75public Task<BrowserPageSessionResult> Completion => _monitorTask ?? throw new InvalidOperationException("Browser page session has not started."); 77public async Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(CancellationToken cancellationToken) 127public static async Task<BrowserPageSession> StartAsync( 151internal static async Task<BrowserPageSession> StartAsync( 280private async Task<string> CreateTargetAsync(CancellationToken cancellationToken) 327private async Task<BrowserPageSessionResult> MonitorAsync() 382private async Task<bool> TryReconnectAsync(Exception connectionError) 455private async Task<ConnectionSnapshot> GetConnectionSnapshotAsync()
IBrowserHost.cs (4)
34Task<IBrowserLogsCdpConnection> CreateCdpConnectionAsync( 42Task<IBrowserPageSession> CreatePageSessionAsync( 58Task<BrowserPageSessionResult> Completion { get; } 60Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(CancellationToken cancellationToken);
IBrowserLogsSessionManager.cs (1)
10Task<BrowserLogsScreenshotCaptureResult> CaptureScreenshotAsync(string resourceName, CancellationToken cancellationToken);
Aspire.Hosting.Browsers.Tests (136)
BrowserHostTests.cs (3)
72var enableDiscoveryTask = connection.EnableTargetDiscoveryAsync(CancellationToken.None); 117public Task<BrowserLogsProcessResult> ProcessTask => _processCompletion.Task; 121public async Task<byte[]> ReadFrameAsync()
BrowserLogsBuilderExtensionsTests.cs (4)
1766private static Task<IReadOnlyList<LogLine>> CaptureLogsAsync(ResourceLoggerService resourceLoggerService, string resourceName, Action writeLogs) => 1797public Task<BrowserLogsScreenshotCaptureResult> CaptureScreenshotAsync(string resourceName, CancellationToken cancellationToken) 1815public Task<IBrowserLogsRunningSession> StartSessionAsync( 1897public Task<byte[]> CaptureScreenshotAsync(CancellationToken cancellationToken)
BrowserLogsCdpConnectionTests.cs (14)
53var createTargetTask = connection.CreateTargetAsync(CancellationToken.None); 54var attachToTargetTask = connection.AttachToTargetAsync("target-1", CancellationToken.None); 124var captureTask = connection.CaptureScreenshotAsync("target-session-1", CancellationToken.None); 167var createTargetTask = connection.CreateTargetAsync(CancellationToken.None); 296private static async Task<ReceivedCommand> ReceiveCommandAsync(WebSocket socket) 345private static async Task<JsonDocument> ReceiveJsonDocumentAsync(WebSocket socket) 371private static async Task<byte[]> ReceiveNullTerminatedFrameAsync(Stream stream) 426public Task<BrowserLogsCreateTargetResult> CreateTargetAsync(CancellationToken cancellationToken) 432public Task<BrowserLogsGetTargetsResult> GetTargetsAsync(CancellationToken cancellationToken) 437public Task<BrowserLogsAttachToTargetResult> AttachToTargetAsync(string targetId, CancellationToken cancellationToken) 442public Task<BrowserLogsCommandAck> CloseTargetAsync(string targetId, CancellationToken cancellationToken) 447public Task<BrowserLogsCommandAck> EnableTargetDiscoveryAsync(CancellationToken cancellationToken) 457public Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(string sessionId, CancellationToken cancellationToken) 462public Task<BrowserLogsCommandAck> NavigateAsync(string sessionId, Uri url, CancellationToken cancellationToken)
BrowserLogsPipeBrowserProcessLauncherTests.cs (1)
75private static async Task<byte[]> ReadExactlyAsync(Stream stream, int byteCount)
BrowserLogsRunningSessionTests.cs (4)
123public Task<IBrowserLogsCdpConnection> CreateCdpConnectionAsync( 129public Task<IBrowserPageSession> CreatePageSessionAsync( 163public Task<BrowserPageSessionResult> Completion => _completionSource.Task; 167public Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(CancellationToken cancellationToken)
BrowserLogsSessionManagerTests.cs (3)
613public Task<IBrowserLogsRunningSession> StartSessionAsync( 659public Task<IBrowserLogsCdpConnection> CreateCdpConnectionAsync( 665public Task<IBrowserPageSession> CreatePageSessionAsync(
BrowserPageSessionTests.cs (10)
192var captureTask = session.CaptureScreenshotAsync(CancellationToken.None); 363public Task<IBrowserLogsCdpConnection> CreateCdpConnectionAsync( 369public Task<IBrowserPageSession> CreatePageSessionAsync( 410public Task<BrowserLogsCreateTargetResult> CreateTargetAsync(CancellationToken cancellationToken) 416public Task<BrowserLogsGetTargetsResult> GetTargetsAsync(CancellationToken cancellationToken) 422public Task<BrowserLogsAttachToTargetResult> AttachToTargetAsync(string targetId, CancellationToken cancellationToken) 428public Task<BrowserLogsCommandAck> CloseTargetAsync(string targetId, CancellationToken cancellationToken) 434public Task<BrowserLogsCommandAck> EnableTargetDiscoveryAsync(CancellationToken cancellationToken) 447public Task<BrowserLogsCommandAck> NavigateAsync(string sessionId, Uri url, CancellationToken cancellationToken) 453public async Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(string sessionId, CancellationToken cancellationToken)
ConsoleLoggingTestHelpers.cs (3)
13public static async Task<IReadOnlyList<LogLine>> CaptureLogsAsync(ResourceLoggerService service, string resourceName, int targetLogCount, Action writeLogs) 16var watchTask = WatchForLogsAsync(service.WatchAsync(resourceName), targetLogCount); 36public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerable<IReadOnlyList<LogLine>> watchEnumerable, int targetLogCount)
src\Aspire.Hosting.Browsers\BrowserEndpointDiscovery.cs (2)
52public async Task<BrowserDebugEndpointMetadata?> TryReadAndValidateAsync(BrowserHostIdentity identity, string? profileDirectoryName, CancellationToken cancellationToken) 199private static async Task<bool> ProbeBrowserEndpointAsync(Uri browserEndpoint, CancellationToken cancellationToken)
src\Aspire.Hosting.Browsers\BrowserHost.cs (6)
37public virtual async Task<IBrowserLogsCdpConnection> CreateCdpConnectionAsync( 46public Task<IBrowserPageSession> CreatePageSessionAsync( 58private async Task<IBrowserPageSession> CreatePageSessionCoreAsync( 85private readonly Task<BrowserLogsProcessResult> _processTask; 111public override Task<IBrowserLogsCdpConnection> CreateCdpConnectionAsync( 142public static async Task<OwnedBrowserHost> StartAsync(
src\Aspire.Hosting.Browsers\BrowserHostRegistry.cs (5)
20private readonly Func<BrowserConfiguration, BrowserHostIdentity, BrowserLogsUserDataDirectory, CancellationToken, Task<IBrowserHost>> _createHostAsync; 41Func<BrowserConfiguration, BrowserHostIdentity, BrowserLogsUserDataDirectory, CancellationToken, Task<IBrowserHost>>? createHostAsync, 52public async Task<BrowserHostLease> AcquireAsync(BrowserConfiguration configuration, CancellationToken cancellationToken) 209private async Task<bool> TryWaitForLockAsync(CancellationToken cancellationToken) 292private async Task<IBrowserHost> CreateHostCoreAsync(
src\Aspire.Hosting.Browsers\BrowserLogsArtifacts.cs (2)
12Task<BrowserLogsArtifact> WriteArtifactAsync( 42public async Task<BrowserLogsArtifact> WriteArtifactAsync(
src\Aspire.Hosting.Browsers\BrowserLogsCdpConnection.cs (21)
16Task<BrowserLogsCreateTargetResult> CreateTargetAsync(CancellationToken cancellationToken); 18Task<BrowserLogsGetTargetsResult> GetTargetsAsync(CancellationToken cancellationToken); 20Task<BrowserLogsAttachToTargetResult> AttachToTargetAsync(string targetId, CancellationToken cancellationToken); 22Task<BrowserLogsCommandAck> CloseTargetAsync(string targetId, CancellationToken cancellationToken); 24Task<BrowserLogsCommandAck> EnableTargetDiscoveryAsync(CancellationToken cancellationToken); 28Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(string sessionId, CancellationToken cancellationToken); 30Task<BrowserLogsCommandAck> NavigateAsync(string sessionId, Uri url, CancellationToken cancellationToken); 67public static async Task<BrowserLogsCdpConnection> ConnectAsync( 81internal static async Task<BrowserLogsCdpConnection> ConnectAsync( 107public Task<BrowserLogsCreateTargetResult> CreateTargetAsync(CancellationToken cancellationToken) 117public Task<BrowserLogsGetTargetsResult> GetTargetsAsync(CancellationToken cancellationToken) 127public Task<BrowserLogsAttachToTargetResult> AttachToTargetAsync(string targetId, CancellationToken cancellationToken) 141public Task<BrowserLogsCommandAck> CloseTargetAsync(string targetId, CancellationToken cancellationToken) 151public Task<BrowserLogsCommandAck> EnableTargetDiscoveryAsync(CancellationToken cancellationToken) 176public Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(string sessionId, CancellationToken cancellationToken) 191public Task<BrowserLogsCommandAck> NavigateAsync(string sessionId, Uri url, CancellationToken cancellationToken) 225private async Task<TResult> SendCommandAsync<TResult>( 361public Task<TResult> Task => _taskCompletionSource.Task; 442Task<byte[]> ReceiveAsync(CancellationToken cancellationToken); 455public async Task<byte[]> ReceiveAsync(CancellationToken cancellationToken) 534public async Task<byte[]> ReceiveAsync(CancellationToken cancellationToken)
src\Aspire.Hosting.Browsers\BrowserLogsCdpConnectionMultiplexer.cs (7)
143public Task<BrowserLogsCreateTargetResult> CreateTargetAsync(CancellationToken cancellationToken) 149public Task<BrowserLogsGetTargetsResult> GetTargetsAsync(CancellationToken cancellationToken) 155public Task<BrowserLogsAttachToTargetResult> AttachToTargetAsync(string targetId, CancellationToken cancellationToken) 161public Task<BrowserLogsCommandAck> CloseTargetAsync(string targetId, CancellationToken cancellationToken) 167public Task<BrowserLogsCommandAck> EnableTargetDiscoveryAsync(CancellationToken cancellationToken) 179public Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(string sessionId, CancellationToken cancellationToken) 185public Task<BrowserLogsCommandAck> NavigateAsync(string sessionId, Uri url, CancellationToken cancellationToken)
src\Aspire.Hosting.Browsers\BrowserLogsConfigurationManager.cs (1)
148public async Task<ExecuteCommandResult> ConfigureAsync(BrowserLogsResource resource, InteractionInputCollection arguments, CancellationToken _)
src\Aspire.Hosting.Browsers\BrowserLogsPipeBrowserProcess.cs (3)
14Task<BrowserLogsProcessResult> ProcessTask { get; } 21Task<BrowserLogsProcessResult> processTask, 35public Task<BrowserLogsProcessResult> ProcessTask { get; } = processTask;
src\Aspire.Hosting.Browsers\BrowserLogsPipeBrowserProcessLauncher.Unix.cs (3)
64var processTask = WaitForPosixProcessAsync(processId); 126private static async Task<BrowserLogsProcessResult> WaitForPosixProcessAsync(int processId) 247private sealed class PosixProcessLifetime(int processId, Task<BrowserLogsProcessResult> processTask) : IBrowserLogsPipeBrowserProcessLifetime
src\Aspire.Hosting.Browsers\BrowserLogsPipeBrowserProcessLauncher.Windows.cs (3)
54var processTask = WaitForWindowsProcessAsync(processHandle); 215private static async Task<BrowserLogsProcessResult> WaitForWindowsProcessAsync(SafeWaitHandle processHandle) 302private sealed class WindowsProcessLifetime(int processId, SafeWaitHandle processHandle, SafeWaitHandle? jobHandle, Task<BrowserLogsProcessResult> processTask) : IBrowserLogsPipeBrowserProcessLifetime
src\Aspire.Hosting.Browsers\BrowserLogsRunningSession.cs (8)
28Task<byte[]> CaptureScreenshotAsync(CancellationToken cancellationToken); 35Task<IBrowserLogsRunningSession> StartSessionAsync( 57public async Task<IBrowserLogsRunningSession> StartSessionAsync( 100private Task<BrowserSessionResult>? _completion; 143private Task<BrowserSessionResult> Completion => _completion ?? throw new InvalidOperationException("Session has not been started."); 145public static async Task<BrowserLogsRunningSession> StartAsync( 176public async Task<byte[]> CaptureScreenshotAsync(CancellationToken cancellationToken) 275private async Task<BrowserSessionResult> MonitorAsync()
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (1)
184public async Task<BrowserLogsScreenshotCaptureResult> CaptureScreenshotAsync(string resourceName, CancellationToken cancellationToken)
src\Aspire.Hosting.Browsers\BrowserPageSession.cs (10)
9internal delegate Task<IBrowserLogsCdpConnection> BrowserLogsCdpConnectionFactory( 44private Task<BrowserPageSessionResult>? _monitorTask; 75public Task<BrowserPageSessionResult> Completion => _monitorTask ?? throw new InvalidOperationException("Browser page session has not started."); 77public async Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(CancellationToken cancellationToken) 127public static async Task<BrowserPageSession> StartAsync( 151internal static async Task<BrowserPageSession> StartAsync( 280private async Task<string> CreateTargetAsync(CancellationToken cancellationToken) 327private async Task<BrowserPageSessionResult> MonitorAsync() 382private async Task<bool> TryReconnectAsync(Exception connectionError) 455private async Task<ConnectionSnapshot> GetConnectionSnapshotAsync()
src\Aspire.Hosting.Browsers\IBrowserHost.cs (4)
34Task<IBrowserLogsCdpConnection> CreateCdpConnectionAsync( 42Task<IBrowserPageSession> CreatePageSessionAsync( 58Task<BrowserPageSessionResult> Completion { get; } 60Task<BrowserLogsCaptureScreenshotResult> CaptureScreenshotAsync(CancellationToken cancellationToken);
src\Aspire.Hosting.Browsers\IBrowserLogsSessionManager.cs (1)
10Task<BrowserLogsScreenshotCaptureResult> CaptureScreenshotAsync(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)
tests\Shared\TestInteractionService.cs (8)
27public Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 32public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 37public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 45public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 60public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 67public async Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 76public async Task<InteractionResult<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default) 90var completionTask = data.CompletionTcs.Task;
Aspire.Hosting.CodeGeneration.Go.Tests (7)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (5)
240Func<TestCallbackContext, Task<bool>> asyncCallback) 428Func<Task<string>> asyncValueProvider) 593Func<TestResourceContext, Task<bool>> validator) where T : IResource 708public static Task<string> GetStatusAsync( 732public static Task<bool> WaitForReadyAsync(
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestTypes.cs (2)
78public Task<string> GetValueAsync() 95public Task<bool> ValidateAsync()
Aspire.Hosting.CodeGeneration.Java.Tests (12)
AtsJavaCodeGeneratorTests.cs (5)
3661private static async Task<JavaProbeWorkspace> CreateJavaProbeWorkspaceAsync( 3741public Task<ProcessResult> RunClassAsync(string className, TimeSpan timeout) 3756private async Task<ProcessResult> RunProcessAsync(string fileName, string[] arguments, TimeSpan timeout) 3775var stdOutTask = process.StandardOutput.ReadToEndAsync(); 3776var stdErrTask = process.StandardError.ReadToEndAsync();
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (5)
240Func<TestCallbackContext, Task<bool>> asyncCallback) 428Func<Task<string>> asyncValueProvider) 593Func<TestResourceContext, Task<bool>> validator) where T : IResource 708public static Task<string> GetStatusAsync( 732public static Task<bool> WaitForReadyAsync(
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestTypes.cs (2)
78public Task<string> GetValueAsync() 95public Task<bool> ValidateAsync()
Aspire.Hosting.CodeGeneration.Python.Tests (9)
AtsPythonCodeGeneratorTests.cs (2)
424var standardOutput = process.StandardOutput.ReadToEndAsync(); 425var standardError = process.StandardError.ReadToEndAsync();
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (5)
240Func<TestCallbackContext, Task<bool>> asyncCallback) 428Func<Task<string>> asyncValueProvider) 593Func<TestResourceContext, Task<bool>> validator) where T : IResource 708public static Task<string> GetStatusAsync( 732public static Task<bool> WaitForReadyAsync(
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestTypes.cs (2)
78public Task<string> GetValueAsync() 95public Task<bool> ValidateAsync()
Aspire.Hosting.CodeGeneration.Rust.Tests (7)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (5)
240Func<TestCallbackContext, Task<bool>> asyncCallback) 428Func<Task<string>> asyncValueProvider) 593Func<TestResourceContext, Task<bool>> validator) where T : IResource 708public static Task<string> GetStatusAsync( 732public static Task<bool> WaitForReadyAsync(
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestTypes.cs (2)
78public Task<string> GetValueAsync() 95public Task<bool> ValidateAsync()
Aspire.Hosting.CodeGeneration.TypeScript.Tests (7)
TestTypes\TestExtensions.cs (5)
240Func<TestCallbackContext, Task<bool>> asyncCallback) 428Func<Task<string>> asyncValueProvider) 593Func<TestResourceContext, Task<bool>> validator) where T : IResource 708public static Task<string> GetStatusAsync( 732public static Task<bool> WaitForReadyAsync(
TestTypes\TestTypes.cs (2)
78public Task<string> GetValueAsync() 95public Task<bool> ValidateAsync()
Aspire.Hosting.Containers.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.DevTunnels (45)
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 virtual Task<int> CreateTunnelAsync( 72public virtual Task<int> UpdateTunnelAsync( 90public Task<int> ListPortsAsync( 103public Task<int> ListAccessAsync( 118public Task<int> ResetAccessAsync( 133public Task<int> CreateAccessAsync( 157public Task<int> DeleteTunnelAsync( 165public Task<int> ShowTunnelAsync( 173public Task<int> CreatePortAsync( 192public Task<int> UpdatePortAsync( 211public Task<int> DeletePortAsync( 220protected virtual Task<int> RunAsync(string[] args, TextWriter? outputWriter = null, TextWriter? errorWriter = null, ILogger? logger = default, CancellationToken cancellationToken = default) 223private Task<int> RunAsync(string[] args, TextWriter? outputWriter = null, TextWriter? errorWriter = null, bool useShellExecute = false, ILogger? logger = default, CancellationToken cancellationToken = default) 238private async Task<int> RunAsync(Action<bool, string> onOutput, string[] args, bool useShellExecute = false, ILogger? logger = default, CancellationToken cancellationToken = default)
DevTunnelCliClient.cs (13)
32public async Task<Version> GetVersionAsync(ILogger? logger = default, CancellationToken cancellationToken = default) 66public async Task<DevTunnelStatus> CreateTunnelAsync(string tunnelId, DevTunnelOptions options, ILogger? logger = default, CancellationToken cancellationToken = default) 156public async Task<DevTunnelStatus> GetTunnelAsync(string tunnelId, ILogger? logger = default, CancellationToken cancellationToken = default) 166public async Task<DevTunnelPortList> GetPortListAsync(string tunnelId, ILogger? logger = default, CancellationToken cancellationToken = default) 175public async Task<DevTunnelPortStatus> CreatePortAsync(string tunnelId, int portNumber, DevTunnelPortOptions portOptions, ILogger? logger = default, CancellationToken cancellationToken = default) 244public async Task<DevTunnelPortDeleteResult> DeletePortAsync(string tunnelId, int portNumber, ILogger? logger = default, CancellationToken cancellationToken = default) 253public async Task<DevTunnelAccessStatus> GetAccessAsync(string tunnelId, int? portNumber = null, ILogger? logger = default, CancellationToken cancellationToken = default) 262public async Task<UserLoginStatus> GetUserLoginStatusAsync(ILogger? logger = default, CancellationToken cancellationToken = default) 271public async Task<UserLoginStatus> UserLoginAsync(LoginProvider provider, ILogger? logger = default, CancellationToken cancellationToken = default) 290private async Task<(T? Result, int ExitCode, string? Error)> CallCliAsJsonAsync<T>(Func<TextWriter, TextWriter, ILogger?, CancellationToken, Task<int>> cliCall, ILogger? logger = default, CancellationToken cancellationToken = default) 295private 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)
22public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
DevTunnelPortHealthCheck.cs (1)
13public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
DevTunnelResourceBuilderExtensions.cs (2)
833private static async Task<ExecuteCommandResult> ShowTunnelUrlsAsync(DevTunnelPortResource portResource, ExecuteCommandContext context) 947internal 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 (32)
DevTunnelResourceBuilderExtensionsTests.cs (4)
564var commandTask = command.ExecuteCommand(new ExecuteCommandContext 616var commandTask = command.ExecuteCommand(new ExecuteCommandContext 664var commandTask = command.ExecuteCommand(new ExecuteCommandContext 814public Task<RequiredCommandValidationResult> ValidateAsync(IResource resource, RequiredCommandAnnotation annotation, CancellationToken cancellationToken)
TestDevTunnelCli.cs (2)
31protected override Task<int> RunAsync( 50private static Task<int> CompleteAsync(
TestDevTunnelClient.cs (9)
26public Task<Version> GetVersionAsync(ILogger? logger = null, CancellationToken cancellationToken = default) 32public Task<UserLoginStatus> GetUserLoginStatusAsync(ILogger? logger = null, CancellationToken cancellationToken = default) 38public Task<UserLoginStatus> UserLoginAsync(LoginProvider provider, ILogger? logger = null, CancellationToken cancellationToken = default) 44public Task<DevTunnelStatus> CreateTunnelAsync(string tunnelId, DevTunnelOptions options, ILogger? logger = null, CancellationToken cancellationToken = default) 50public Task<DevTunnelPortList> GetPortListAsync(string tunnelId, ILogger? logger = null, CancellationToken cancellationToken = default) 56public Task<DevTunnelPortStatus> CreatePortAsync(string tunnelId, int portNumber, DevTunnelPortOptions options, ILogger? logger = null, CancellationToken cancellationToken = default) 62public Task<DevTunnelPortDeleteResult> DeletePortAsync(string tunnelId, int portNumber, ILogger? logger = null, CancellationToken cancellationToken = default) 68public Task<DevTunnelStatus> GetTunnelAsync(string tunnelId, ILogger? logger = null, CancellationToken cancellationToken = default) 74public Task<DevTunnelAccessStatus> GetAccessAsync(string tunnelId, int? portNumber = null, 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)
tests\Shared\TestInteractionService.cs (8)
27public Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 32public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 37public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 45public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 60public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 67public async Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 76public async Task<InteractionResult<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default) 90var completionTask = data.CompletionTcs.Task;
Aspire.Hosting.Docker (4)
DockerComposeEnvironmentContext.cs (1)
12public async Task<DockerComposeServiceResource> CreateDockerComposeServiceResourceAsync(IResource resource, DistributedApplicationExecutionContext executionContext, CancellationToken cancellationToken)
DockerComposeServiceResource.cs (1)
112internal async Task<Service> BuildComposeServiceAsync()
DockerComposeServiceResourceExtensions.cs (1)
11internal static async Task<object> ProcessValueAsync(this DockerComposeServiceResource resource, object value)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
22public static (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
Aspire.Hosting.Docker.Tests (5)
tests\Shared\InMemoryDeploymentStateManager.cs (1)
27public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
tests\Shared\TestPipelineActivityReporter.cs (4)
157public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 161public Task<IReportingStep> CreateStepAsync(string title, string? parentStepId, int hierarchyLevel, CancellationToken cancellationToken = default) 205public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 244public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Aspire.Hosting.Dotnet (21)
DotnetProjectBuildArtifactManager.cs (1)
44public async Task<string> PublishAndLeaseAsync(
DotnetProjectBuildCoordinator.cs (9)
964private Task<IReadOnlyDictionary<string, string>> EvaluateOnceAsync( 982var precedingEvaluation = 1004private async Task<IReadOnlyDictionary<string, string>> WaitForEvaluationAsync( 1068private async Task<IReadOnlyDictionary<string, string>> EvaluateAsync( 1070Task<IReadOnlyDictionary<string, string>>? precedingEvaluation, 1286Task<IReadOnlyDictionary<string, string>>? precedingEvaluation) 1288public Task<IReadOnlyDictionary<string, string>>? PrecedingEvaluation { get; } = precedingEvaluation; 1296Task<IReadOnlyDictionary<string, string>> task, 1299public Task<IReadOnlyDictionary<string, string>> Task { get; } = task;
DotnetProjectBuildEnvironmentCallbackAnnotation.cs (1)
22public static async Task<MsBuildResponseFile?> CreateResponseFileAsync(
DotnetProjectBuildResource.cs (3)
151internal Task<string> GetBuildTargetPathAsync(ILogger logger, CancellationToken cancellationToken) 168public Task<string> WriteBuildProjectAsync(ILogger logger, CancellationToken cancellationToken) 199private async Task<string> WriteBuildProjectCoreAsync(
DotnetProjectHostingExtensions.cs (2)
413internal static async Task<DotnetProjectRunProperties> ResolveRunPropertiesAfterBuildAsync( 417Func<CancellationToken, Task<DotnetProjectRunProperties>> resolver,
DotnetProjectRunPropertiesResolver.cs (4)
16internal delegate Task<DotnetProjectRunProperties> DotnetProjectRunPropertiesResolverCallback( 26public static async Task<DotnetProjectRunProperties> ResolveAsync( 85var standardOutputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 86var standardErrorTask = process.StandardError.ReadToEndAsync(cancellationToken);
src\Shared\FileLock.cs (1)
106public static async Task<FileLock> AcquireAsync(string lockPath, CancellationToken cancellationToken = default, TimeSpan? timeout = null)
Aspire.Hosting.Dotnet.Tests (24)
DotnetProjectBuildArtifactManagerTests.cs (1)
202private static Task<string> PublishAsync(DotnetProjectBuildArtifactManager manager, string hash) =>
DotnetProjectBuildCoordinatorTests.cs (14)
1172var refreshedEnvironmentTask = EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 1176var refreshedArgumentsTask = ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services).AsTask(); 1177var restartedProjectEnvironmentTask = EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 1240var firstEnvironmentTask = EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 1312var firstEvaluation = EvaluateEnvironmentAsync( 1317var secondEvaluation = EvaluateEnvironmentAsync( 1378var firstEvaluation = EvaluateEnvironmentAsync( 1427var evaluation = EvaluateEnvironmentAsync( 2512var resolutionTask = launchTool.AsCallbackAnnotation().EvaluateOnceAsync(callbackContext); 2566var resolutionTask = DotnetProjectHostingExtensions.ResolveRunPropertiesAfterBuildAsync( 2722var workerStartingTask = app.ResourceNotifications.WaitForResourceAsync( 2743var forcedStartingTask = app.ResourceNotifications.WaitForResourceAsync( 3018private static async Task<IReadOnlyList<LogLine>> ReadLogsAsync( 3075private static Task<IExecutionConfigurationResult> EvaluateEnvironmentAsync(
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.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.EntityFrameworkCore (18)
EFCoreOperationExecutor.cs (9)
197private async Task<EFOperationResult> ExecuteEfCommandAsync(string command, string subCommand, Dictionary<string, string?>? additionalArgs = null, bool noBuild = true) 531public async Task<EFOperationResult> UpdateDatabaseAsync() 537public async Task<EFOperationResult> DropDatabaseAsync() 546public async Task<EFOperationResult> ResetDatabaseAsync() 563public async Task<EFOperationResult> AddMigrationAsync(string? migrationName = null, string? outputDir = null, string? @namespace = null) 586public async Task<EFOperationResult> RemoveMigrationAsync() 595public async Task<EFOperationResult> GetDatabaseStatusAsync() 697public async Task<EFOperationResult> GenerateMigrationScriptAsync(string? outputPath = null, bool idempotent = true, bool noTransactions = false) 728public async Task<EFOperationResult> GenerateMigrationBundleAsync(string? outputPath = null, string? targetRuntime = null, bool selfContained = false)
EFResourceBuilderExtensions.cs (9)
356Func<EFCoreOperationExecutor, string?, Task<EFOperationResult>> executeOperation) 408private static async Task<ExecuteCommandResult> StartEfToolResourceAsync(ExecuteCommandContext context, DotnetToolResource toolResource) 799private static Task<ExecuteCommandResult> ExecuteEFCommandAsync( 803Func<EFCoreOperationExecutor, Task<EFOperationResult>> executeOperation) => 826private static async Task<ExecuteCommandResult> ExecuteWithStateManagementAsync( 831Func<EFCoreOperationExecutor, ILogger, IInteractionService?, Task<ExecuteCommandResult>> executeOperation) 906private static Task<ExecuteCommandResult> ExecuteAddMigrationCommandAsync( 953private static Task<ExecuteCommandResult> ExecuteRemoveMigrationCommandAsync( 995private static Task<ExecuteCommandResult> ExecuteGetStatusCommandAsync(
Aspire.Hosting.EntityFrameworkCore.Tests (2)
EFCoreOperationExecutorTests.cs (1)
216private static DotnetToolResource CreateToolResource(Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand)
EFMigrationPipelineTests.cs (1)
767private static async Task<List<PipelineStep>> CreateStepsAsync(
Aspire.Hosting.Foundry (53)
FoundryExtensions.cs (3)
463async Task<string> DownloadModelAsync(string requestedModel) 471var downloadTask = DownloadWithProgressAsync(); 484async Task<string> DownloadWithProgressAsync()
FoundryLocalHealthCheck.cs (1)
11public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
FoundryLocalService.cs (15)
58public static async Task<string> DownloadModelAsync(string modelName, Action<float> downloadProgress, CancellationToken cancellationToken) 73public static async Task<string?> TryLoadCachedModelAsync(string modelName, CancellationToken cancellationToken) 110public static Task<bool> IsModelLoadedAsync(Uri endpoint, string modelId, HttpClient httpClient, CancellationToken cancellationToken) 112Func<CancellationToken, Task<string>>? legacyModelListProvider = null; 122internal static async Task<bool> IsModelLoadedCoreAsync( 126Func<CancellationToken, Task<string>>? legacyModelListProvider, 349private static async Task<string> RunFoundryCommandAsync( 370private static async Task<FoundryCommandResult> RunFoundryCommandCoreAsync( 391internal static async Task<FoundryCommandResult> RunProcessAsync( 418var outputTask = ReadOutputAsync(process.StandardOutput, ProcessOutput, cancellationToken, readCancellation.Token); 419var errorTask = ReadOutputAsync(process.StandardError, ProcessOutput, cancellationToken, readCancellation.Token); 434var readersCompletionTask = Task.WhenAll(outputTask, errorTask); 468private static async Task<string> ReadOutputAsync( 508private static async Task<string> GetModelIdAsync(string modelName, CancellationToken cancellationToken) 720private static async Task<string> GetDaemonVerbAsync(CancellationToken cancellationToken)
HostedAgent\AzureHostedAgentResource.cs (3)
104private async Task<HostedAgentConfiguration> ToHostedAgentConfigurationAsync(PipelineStepContext context) 150private async Task<ProjectsAgentVersion> DeployAsync(PipelineStepContext context, AzureCognitiveServicesProjectResource project) 298internal static async Task<Dictionary<string, string>> GetResolvedEnvironmentVariablesAsync(
LocalModelHealthCheck.cs (1)
10public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
PromptAgent\AzurePromptAgentResource.cs (3)
194private async Task<ProjectsAgentVersion> DeployAsync( 253private async Task<ProjectsAgentVersionCreationOptions> ToProjectsAgentVersionCreationOptionsAsync(CancellationToken cancellationToken) 413private async Task<ImmutableArray<UrlSnapshot>> BuildPortalUrlsAsync(IConfiguration configuration, CancellationToken cancellationToken)
Toolbox\FoundryToolboxReadinessProbe.cs (2)
18public async Task<IReadOnlyList<string>> WaitForToolsAsync( 148private async Task<McpResponse> SendRequestAsync(
Toolbox\FoundryToolboxReconciler.cs (9)
175Task<FoundryToolboxState?> GetAsync(string name, CancellationToken cancellationToken); 177Task<string> CreateVersionAsync( 191public async Task<FoundryToolboxState?> GetAsync(string name, CancellationToken cancellationToken) 239public Task<string> CreateVersionAsync( 281private async Task<T> ExecuteWithProjectReadinessRetryAsync<T>( 282Func<CancellationToken, Task<T>> operation, 305public async Task<FoundryToolboxReconcileResult> ReconcileAsync( 320public async Task<FoundryToolboxReconcileResult> ReconcileAsync( 527public async Task<string> ValidateAsync(
Toolbox\FoundryToolboxResource.cs (3)
203internal async Task<FoundryToolboxDeploymentDefinition> CreateDeploymentDefinitionAsync( 234private async Task<FoundryToolboxReconcileResult> DeployAsync( 261private async Task<IFoundryToolboxAdministration> CreateAdministrationAsync(
ToolResources\AzureAISearchToolResource.cs (1)
55public override async Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default)
ToolResources\AzureFunctionToolResource.cs (1)
98public override Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default)
ToolResources\BingGroundingToolResource.cs (1)
54public override async Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default)
ToolResources\BuiltInToolDefinitions.cs (5)
31public override Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default) 65public override Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default) 93public override Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default) 116public override Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default) 169public override Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default)
ToolResources\ConfigOnlyToolDefinitions.cs (2)
42public override Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default) 86public override Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default)
ToolResources\FoundryToolResource.cs (1)
38public abstract Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default);
ToolResources\FunctionToolResource.cs (1)
69public override Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default)
ToolResources\IFoundryTool.cs (1)
29Task<ResponseTool> ToAgentToolAsync(CancellationToken cancellationToken = default);
Aspire.Hosting.Foundry.Tests (18)
FoundryToolboxReconcilerTests.cs (3)
496private static async Task<FoundryToolboxDeploymentDefinition> CreateDefinitionAsync() 551public Task<FoundryToolboxState?> GetAsync(string name, CancellationToken cancellationToken) => 554public Task<string> CreateVersionAsync(
Helpers\SequenceHttpMessageHandler.cs (1)
12protected override async Task<HttpResponseMessage> SendAsync(
HostedAgentExtensionTests.cs (1)
810protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, 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\TestPipelineActivityReporter.cs (4)
157public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 161public Task<IReportingStep> CreateStepAsync(string title, string? parentStepId, int hierarchyLevel, CancellationToken cancellationToken = default) 205public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 244public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
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.Go.Tests (1)
AddGoAppTests.cs (1)
1186private static async Task<GoLaunchConfiguration> CreateLaunchConfigurationAsync(IResource resource)
Aspire.Hosting.Java.Tests (14)
AddJavaAppPublishTests.cs (9)
1716private static async Task<(int ExitCode, string Stdout, string Stderr)> RunDockerCommandAsync(string arguments, string workingDirectory) 1732var stdoutTask = process.StandardOutput.ReadToEndAsync(); 1733var stderrTask = process.StandardError.ReadToEndAsync(); 1880private static async Task<(int ExitCode, string StandardOutput, string StandardError)> RunShellAsync(string command, string workingDirectory) 1893var stdoutTask = process.StandardOutput.ReadToEndAsync(); 1894var stderrTask = process.StandardError.ReadToEndAsync(); 2178private async Task<string> PublishQuarkusDockerfileAsync( 2400private async Task<string> PublishDockerfileAsync( 2424private async Task<string?> PublishBuildContextIgnoreAsync(
AddJavaAppTests.cs (1)
1354private static async Task<JavaLaunchConfiguration> GetLaunchConfigurationAsync(IResourceBuilder<JavaAppResource> app)
tests\Shared\TestPipelineActivityReporter.cs (4)
157public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 161public Task<IReportingStep> CreateStepAsync(string title, string? parentStepId, int hierarchyLevel, CancellationToken cancellationToken = default) 205public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 244public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Aspire.Hosting.JavaScript.Tests (22)
AddBunAppTests.cs (1)
396private static async Task<JavaScriptLaunchConfiguration> CreateLaunchConfigurationAsync(IResource resource)
AddDenoAppTests.cs (5)
1699private static async Task<IReadOnlyList<string>> GetDenoArgsAsync(Action<IResourceBuilder<DenoAppResource>> configure, string entrypoint = "main.ts") 2684private static async Task<JavaScriptLaunchConfiguration> CreateLaunchConfigurationAsync( 2704private static async Task<(int ExitCode, string Stdout, string Stderr)> RunDockerCommandAsync(string arguments, string workingDirectory) 2721var stdoutTask = process.StandardOutput.ReadToEndAsync(); 2722var stderrTask = process.StandardError.ReadToEndAsync();
AddJavaScriptAppTests.cs (3)
689private static async Task<(int ExitCode, string Stdout, string Stderr)> RunDockerCommandAsync(string arguments, string workingDirectory) 705var stdoutTask = process.StandardOutput.ReadToEndAsync(); 706var stderrTask = process.StandardError.ReadToEndAsync();
AddNodeAppTests.cs (1)
628private static async Task<JavaScriptLaunchConfiguration> CreateLaunchConfigurationAsync(IResource resource)
AddViteAppTests.cs (1)
1105private static async Task<string> GenerateViteWrapperAsync(DistributedApplication app)
DenoFunctionalTests.cs (1)
90private static async Task<int> GetTelemetryCountAsync(HttpClient client, string requestUri, CancellationToken cancellationToken)
RequiredCommandTests.cs (1)
229private static async Task<string[]> GetRequiredCommandsAsync(IDistributedApplicationBuilder builder, IResource resource)
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 (22)
CertManagerExtensions.cs (3)
355private static Task<IEnumerable<PipelineStep>> BuildIssuerApplySteps( 386private static Task<IEnumerable<PipelineStep>> BuildIssuerDeleteSteps( 561internal static async Task<string> BuildClusterIssuerManifestAsync(
Deployment\DefaultHelmRunner.cs (1)
13public async Task<int> RunAsync(
Deployment\HelmDeploymentEngine.cs (4)
47private static async Task<string> ResolveReleaseNameAsync( 71private static async Task<string> ResolveNamespaceAsync( 119internal static Task<IReadOnlyList<PipelineStep>> CreateStepsAsync( 706private static async Task<List<string>> GetServiceEndpointsAsync(
Deployment\IHelmRunner.cs (1)
20Task<int> RunAsync(
KubernetesEnvironmentContext.cs (1)
15public async Task<KubernetesResource> CreateKubernetesResourceAsync(IResource resource, DistributedApplicationExecutionContext executionContext, CancellationToken cancellationToken)
KubernetesEnvironmentResource.cs (9)
220internal Func<KubernetesEnvironmentResource, PipelineStepFactoryContext, Task<IReadOnlyList<PipelineStep>>>? DeploymentEngineStepsFactory { get; set; } 598private static async Task<string> ResolveExpressionAtDeployTimeAsync(ReferenceExpression expression, CancellationToken cancellationToken) 625private async Task<string> ResolveExpressionAsync(ReferenceExpression expression, string owningResourceName, CancellationToken cancellationToken) 656private async Task<string> ResolveValueProviderAsync( 708private async Task<List<string>> ResolveHostnamesAsync( 761private async Task<Ingress?> BuildIngressObject( 1003private async Task<PersistentVolumeClaim> BuildPersistentVolumeClaim( 1660private static async Task<string?> DiscoverGatewayFqdnAsync( 1772private static async Task<List<int>> FindHostnamelessHttpsListeners(
KubernetesResource.cs (2)
502private async Task<object> ProcessValueAsync(KubernetesEnvironmentContext context, DistributedApplicationExecutionContext executionContext, object value, bool embedded = false) 643private async Task<object> BuildHelmConditional(KubernetesEnvironmentContext context, DistributedApplicationExecutionContext executionContext, ReferenceExpression expr, ParameterResource conditionParam, bool embedded)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
22public static (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
Aspire.Hosting.Kubernetes.Tests (9)
HelmVersionValidatorTests.cs (1)
111public Task<int> RunAsync(
KubernetesHelmChartTests.cs (1)
508private static async Task<List<PipelineStep>> CreateStepsAsync(
PipelineStepTestHelpers.cs (1)
23public static async Task<List<PipelineStep>> CreateStepsAsync(IServiceProvider services, IResource resource)
tests\Shared\FakeHelmRunner.cs (1)
45public Task<int> RunAsync(
tests\Shared\InMemoryDeploymentStateManager.cs (1)
27public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
tests\Shared\TestPipelineActivityReporter.cs (4)
157public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 161public Task<IReportingStep> CreateStepAsync(string title, string? parentStepId, int hierarchyLevel, CancellationToken cancellationToken = default) 205public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 244public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Aspire.Hosting.Maui (6)
Lifecycle\MauiBuildQueueEventSubscriber.cs (4)
403var terminalStateTask = notificationService.WaitForResourceAsync( 424internal virtual async Task<bool> StopResourceAfterLaunchTimeoutAsync(IResource resource, Task nextStartObserved, CancellationToken cancellationToken) 436var stopTask = ExecuteStopCommandAsync(stopCts.Token); 446async Task<bool> ExecuteStopCommandAsync(CancellationToken stopCancellationToken)
Utilities\MauiEnvironmentHelper.cs (2)
32public static async Task<string?> CreateAndroidEnvironmentTargetsFileAsync( 184public static async Task<string?> CreateiOSEnvironmentTargetsFileAsync(
Aspire.Hosting.Maui.Tests (20)
MauiBuildQueueTests.cs (4)
1119private static void AddOriginalStopCommand(IResource resource, Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand) 1351public static async Task<BuildQueueTestEnvironment> CreateAsync() 1382public static async Task<BuildQueueTestEnvironment> CreateWithTwoProjectsAsync() 1419private static async Task<TestableBuildQueueSubscriber> InitializeSubscriberAsync(DistributedApplication app)
MauiPlatformExtensionsTests.cs (7)
613static async Task<string> EvaluateTargetsFileAsync(CommandLineArgsCallbackAnnotation callback, IResource resource) 1113var environmentTask = EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 1232var environmentTask = EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 1336var environmentTask = EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 1386Task<Dictionary<string, string>> environmentTask, 1418private static Task<SerializedMauiLaunchConfiguration> GetSingleMauiLaunchConfigurationAsync(IResource resource) 1427private static async Task<SerializedMauiLaunchConfiguration> DeserializeLaunchConfigurationAsync(IResource resource)
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.MongoDB (1)
MongoDBBuilderExtensions.cs (1)
726public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Aspire.Hosting.MongoDB.Tests (1)
ReplicaSet\MongoDbReplicaSetFunctionalTests.cs (1)
448private static async Task<Dictionary<string, int>> GetMemberIdsByHostAsync(IMongoClient client, CancellationToken ct)
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
410private static async Task<string> WritePhpMyAdminConfiguration(IFileSystemService fileSystemService, IEnumerable<MySqlServerResource> mySqlInstances, CancellationToken cancellationToken)
Aspire.Hosting.MySql.Tests (11)
MySqlFunctionalTests.cs (2)
569async Task<string?[]> RunContainersAsync() 608static 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.Orleans.Tests (1)
OrleansProviderTypeTests.cs (1)
118private static async Task<Dictionary<string, object>> GetEnvironmentVariablesAsync(IResource resource, IDistributedApplicationBuilder builder)
Aspire.Hosting.PostgreSQL (2)
PostgresBuilderExtensions.cs (2)
609private static async Task<IEnumerable<ContainerFileSystemItem>> WritePgWebBookmarks(IEnumerable<PostgresDatabaseResource> postgresInstances, CancellationToken cancellationToken) 642private static async Task<string> WritePgAdminServerJson(IEnumerable<PostgresServerResource> postgresInstances, CancellationToken cancellationToken)
Aspire.Hosting.PostgreSQL.Tests (11)
PostgresFunctionalTests.cs (2)
556async Task<string?[]> RunContainersAsync() 585static 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.Python.Tests (1)
AddPythonAppTests.cs (1)
1631private static async Task<PythonLaunchConfiguration> CreateLaunchConfigurationAsync(IResource resource)
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)
66static 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.Radius (22)
Publishing\RadCredentialRegisterStep.cs (3)
242private static async Task<string> ResolveParameterAsync( 389IReadOnlyList<Func<CancellationToken, Task<(string Flag, string Value)>>> ArgumentFactories, 392internal async Task<IReadOnlyList<string>> ResolveArgumentsAsync(CancellationToken cancellationToken)
Publishing\RadiusDeploymentPipelineStep.cs (2)
42internal static async Task<bool> DetectRadCliAsync(CancellationToken cancellationToken = default) 252internal async Task<string?> WriteDeployParametersFileAsync(ILogger logger, CancellationToken cancellationToken)
Publishing\RadiusInfrastructureBuilder.cs (2)
114internal async Task<RadiusInfrastructureOptions> BuildAsync( 1114private async Task<Dictionary<string, ContainerEnvVarConstruct>> ResolveEnvironmentAsync(IResource resource)
Publishing\SealedSecretApplyStep.cs (15)
268Func<CancellationToken, Task<SealedSecretStatusSnapshot>> getStatus, 269Func<CancellationToken, Task<bool>> secretExists, 317internal static async Task<T> InvokeProbeWithRemainingBudgetAsync<T>( 318Func<CancellationToken, Task<T>> probe, 484private static async Task<long> ApplyManifestAsync(ReadOnlyMemory<byte> content, string? @namespace, string? kubeContext, string storeName, string ns, string name, string manifestPath, ILogger logger, CancellationToken cancellationToken) 497private static async Task<SealedSecretStatusSnapshot> GetSealedSecretStatusAsync(string ns, string name, string? kubeContext, CancellationToken cancellationToken) 508internal static async Task<SealedSecretStatusSnapshot> GetSealedSecretStatusAsync( 513Func<IReadOnlyList<string>, CancellationToken, Task<(int ExitCode, string StdOut, string StdErr)>> runKubectl) 580private static async Task<IReadOnlySet<string>> GetSecretDataKeysAsync(string ns, string name, string? kubeContext, CancellationToken cancellationToken) 616private static async Task<bool> SecretExistsAsync(string ns, string name, string? kubeContext, CancellationToken cancellationToken) 626internal static async Task<bool> SecretExistsAsync( 631Func<IReadOnlyList<string>, CancellationToken, Task<(int ExitCode, string StdOut, string StdErr)>> runKubectl) 676private static async Task<string?> ResolveWorkspaceKubeContextAsync(string configPath, CancellationToken cancellationToken) 828private static async Task<bool> DetectKubectlAsync(CancellationToken cancellationToken) 883private static async Task<(int ExitCode, string StdOut, string StdErr)> RunKubectlAsync(
Aspire.Hosting.Radius.Tests (1)
Publishing\RadCredentialArgumentTests.cs (1)
105private static async Task<IReadOnlyList<string>> ResolveSingleAsync(IResource resource)
Aspire.Hosting.Redis.Tests (1)
AddRedisTests.cs (1)
781private static async Task<string> GetCommandLineArgs(IResourceBuilder<RedisResource> builder)
Aspire.Hosting.RemoteHost (13)
Ats\AtsCallbackProxyFactory.cs (1)
271private async Task<T?> InvokeAsyncResult<T>(string callbackId, JsonObject? args, CancellationToken cancellationToken, int ctParamIndex)
Ats\CapabilityDispatcher.cs (4)
21internal delegate Task<JsonNode?> CapabilityHandler( 538public async Task<JsonNode?> InvokeAsync(string capabilityId, JsonObject? args) 628private static async Task<object?> InvokeMethodAsync(MethodInfo method, object? target, object?[] methodArgs, bool runInvocationOnBackgroundThread) 641private static async Task<object?> UnwrapAsyncResultAsync(object? result, Type returnType)
AtsCapabilityScanner.cs (5)
2213else if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(Task<>)) 2305else if (funcReturnType.IsGenericType && funcReturnType.GetGenericTypeDefinition() == typeof(Task<>)) 2351if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Task<>)) 2650if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Task<>)) 3121if (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)
120public async Task<JsonNode?> InvokeCapabilityAsync(string capabilityId, JsonObject? args)
Aspire.Hosting.RemoteHost.Tests (25)
AtsCapabilityScannerTests.cs (2)
61var result = AtsCapabilityScanner.MapToAtsTypeId(typeof(Task<string>)); 69var result = AtsCapabilityScanner.MapToAtsTypeId(typeof(Task<int>));
AtsExportsTests.cs (2)
84var promptTask = InteractionExports.PromptInputs( 129var promptTask = InteractionExports.PromptInputs(
CallbackProxyTests.cs (3)
407public delegate Task<int> TestCallbackWithIntResult(); 415public delegate Task<string> TestCallbackWithStringResult(string input); 452public Task<TResult> InvokeAsync<TResult>(string callbackId, JsonNode? args, CancellationToken cancellationToken = default)
CapabilityDispatcherTests.cs (6)
2140public Task<TResult> InvokeAsync<TResult>(string callbackId, JsonNode? args, CancellationToken cancellationToken = default) 2192public static async Task<string> AsyncWithResult(string value) 2208public static async Task<string> AsyncThrows(string value) 2334public async Task<string> ProcessAsync(string input) 2397public static int WithAsyncCallback(Func<Task<int>> callback) 2428public static Task<int> TaskBackgroundThreadProbe()
JsonRpcAuthenticationTests.cs (4)
97public static async Task<RemoteHostTestServer> StartAsync() 127public async Task<JsonRpcClientHandle> ConnectAsync() 185private static async Task<Stream> ConnectToServerAsync(string socketPath, CancellationToken cancellationToken) 237public Task<T> InvokeAsync<T>(string methodName, params object?[] arguments)
tests\Shared\TestInteractionService.cs (8)
27public Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 32public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 37public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 45public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 60public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 67public async Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 76public async Task<InteractionResult<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default) 90var completionTask = data.CompletionTcs.Task;
Aspire.Hosting.Rust (6)
CargoMetadataReader.cs (4)
18Task<CargoMetadata> ReadAsync(string workingDirectory, string? manifestPath, string resourceName, IReadOnlyDictionary<string, string> environment, CancellationToken cancellationToken); 63public async Task<CargoMetadata> ReadAsync(string workingDirectory, string? manifestPath, string resourceName, IReadOnlyDictionary<string, string> environment, CancellationToken cancellationToken) 98var stdoutTask = process.StandardOutput.ReadToEndAsync(CancellationToken.None); 99var stderrTask = process.StandardError.ReadToEndAsync(CancellationToken.None);
RustDockerfileGenerator.cs (1)
170private static async Task<List<string>> ResolvePublishCargoArgsAsync(
RustHostingExtensions.cs (1)
687private static async Task<string> ResolveDebugExecutablePathAsync(
Aspire.Hosting.Rust.Tests (12)
AddRustAppPublishTests.cs (1)
1119private async Task<string> PublishDockerfileAsync(
FakeCargoMetadataReader.cs (1)
46public async Task<CargoMetadata> ReadAsync(string workingDirectory, string? manifestPath, string resourceName, IReadOnlyDictionary<string, string> environment, CancellationToken cancellationToken)
RustDebugArgsTests.cs (1)
19private static async Task<(List<string> Args, RustAppResource Resource)> GetArgsAsync(
RustDockerfileShellTests.cs (3)
199private static async Task<(int ExitCode, string StandardOutput, string StandardError)> RunShellAsync( 220var standardOutput = process.StandardOutput.ReadToEndAsync(TestContext.Current.CancellationToken); 221var standardError = process.StandardError.ReadToEndAsync(TestContext.Current.CancellationToken);
RustPublicApiTests.cs (2)
515var launchTask = LaunchConfigurationTestHelpers.InvokeLaunchConfigurationProducerAsync(app.Resource, callbackContext); 523private static async Task<RustLaunchConfiguration> InvokeLaunchConfigurationProducerAsync(
tests\Shared\TestPipelineActivityReporter.cs (4)
157public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 161public Task<IReportingStep> CreateStepAsync(string title, string? parentStepId, int hierarchyLevel, CancellationToken cancellationToken = default) 205public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 244public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Aspire.Hosting.Sdk.Tests (19)
AppHostSdkTargetsTests.cs (19)
880Task<bool>? executionTask = null; 1066private static async Task<string[]> RunAddReferenceToDashboardAndDcpAsync(TemporaryWorkspace workspace, string? extraProjectXml) 1109private static async Task<RunHookProject> CreateRunHookProjectAsync( 1158private static async Task<Dictionary<string, string>> GetComputeRunArgumentsPropertiesAsync( 1171private static async Task<Dictionary<string, string>> GetResolveAspireCliBundlePathPropertiesAsync( 1184private static async Task<Dictionary<string, string>> GetTargetPropertiesAsync( 1219private static async Task<string> CreateFakeAspireCliAsync(string fakeCliDirectory) 1240private static async Task<string> CreateFakeAspireCliThatSetsUpBundleAsync(string fakeCliDirectory) 1291private static async Task<string> CreateFakeAspireCommandShimAsync(string fakeCliDirectory, string extension = ".cmd") 1327private static async Task<string> CreateFakeDnxAsync(string fakeCliDirectory) 1414private static async Task<string> CreateFailingWorkingDirectoryShadowAsync(string workingDirectory, string command) 1632private static async Task<string?> FindFullFrameworkMSBuildAsync() 1812private static async Task<(int ExitCode, string Output)> RunDotNetAsync(string workingDirectory, string arguments) 1825var outputTask = process.StandardOutput.ReadToEndAsync(); 1826var errorTask = process.StandardError.ReadToEndAsync(); 1846private static Task<DotNetResult> RunDotNetWithArgumentsAsync(string workingDirectory, string[] arguments, IDictionary<string, string>? environment = null) 1849private static async Task<DotNetResult> RunProcessWithArgumentsAsync( 1884var outputTask = process.StandardOutput.ReadToEndAsync(); 1885var errorTask = process.StandardError.ReadToEndAsync();
Aspire.Hosting.Tasks (7)
ResolveAspireCliInvocation.cs (2)
168var outputTask = process.StandardOutput.ReadToEndAsync(); 169var errorTask = process.StandardError.ReadToEndAsync();
RunAspireCliCommand.cs (5)
100var standardOutputTask = process.StandardOutput.ReadToEndAsync(); 101var standardErrorTask = process.StandardError.ReadToEndAsync(); 290private static void WaitForProcessOutput(Task<string> standardOutputTask, Task<string> standardErrorTask) 302private void LogProcessOutputIfCompleted(Task<string> outputTask)
Aspire.Hosting.Testing (22)
DistributedApplicationEntryPointInvoker.cs (2)
18public static Func<string[], CancellationToken, Task<DistributedApplication>>? ResolveEntryPoint( 72public async Task<DistributedApplication> InvokeAsync(CancellationToken cancellationToken)
DistributedApplicationFactory.cs (3)
45internal async Task<DistributedApplicationBuilder> ResolveBuilderAsync(CancellationToken cancellationToken = default) 56internal async Task<DistributedApplication> ResolveApplicationAsync(CancellationToken cancellationToken = default) 403private async Task InvokeEntryPoint(Func<string[], CancellationToken, Task<DistributedApplication>> factory)
DistributedApplicationHostingTestingExtensions.cs (3)
65public static async Task<Uri> GetDashboardUrlAsync( 134internal static Task<Uri> GetDashboardUrlAsyncExport(this DistributedApplication app) 193internal static Task<string?> GetConnectionStringAsyncExport(this DistributedApplication app, string resourceName)
DistributedApplicationTestingBuilder.cs (14)
37public static Task<IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint>(CancellationToken cancellationToken = default) 66public static Task<IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint>( 86public static Task<IDistributedApplicationTestingBuilder> CreateAsync(Type entryPoint, CancellationToken cancellationToken = default) 112public static Task<IDistributedApplicationTestingBuilder> CreateAsync( 135public static Task<IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint>(string[] args, CancellationToken cancellationToken = default) 149public static Task<IDistributedApplicationTestingBuilder> CreateAsync(Type entryPoint, string[] args, CancellationToken cancellationToken = default) 165public static Task<IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint>(string[] args, Action<DistributedApplicationOptions, HostApplicationBuilderSettings> configureBuilder, CancellationToken cancellationToken = default) 179public static async Task<IDistributedApplicationTestingBuilder> CreateAsync(Type entryPoint, string[] args, Action<DistributedApplicationOptions, HostApplicationBuilderSettings> configureBuilder, CancellationToken cancellationToken = default) 182private static async Task<IDistributedApplicationTestingBuilder> CreateAsyncCore( 474public async Task<IDistributedApplicationTestingBuilder> CreateBuilderAsync(CancellationToken cancellationToken) 496public async Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 540public async Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 707public Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 805Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken = default);
Aspire.Hosting.Testing.Tests (20)
DashboardTestingBuilderTests.cs (1)
274private static async Task<IDistributedApplicationTestingBuilder> CreateDashboardBuilderAsync(
DashboardUrlTests.cs (2)
133var updatedResourceTask = app.ResourceNotifications.WaitForResourceAsync( 361private static Task<IDistributedApplicationTestingBuilder> CreateDashboardBuilderAsync(params string[] args)
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 (5)
10public static async Task<IReadOnlyList<LogLine>> CaptureLogsAsync(ResourceLoggerService service, string resourceName, int targetLogCount, Action writeLogs) 13var watchTask = WatchForLogsAsync(service.WatchAsync(resourceName), targetLogCount); 33public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(ResourceLoggerService service, int targetLogCount, IResource resource) 39public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerable<IReadOnlyList<LogLine>> watchEnumerable, int targetLogCount) 56public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerator<IReadOnlyList<LogLine>> watchEnumerator, int targetLogCount)
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)
Aspire.Hosting.Tests (191)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (7)
107var waitTask = target.WaitForAppHostReadyAsync(); 938Assert.False(annotation.AsCallbackAnnotation().TryGetCachedResult(out var cached)); 994Assert.False(annotation.AsCallbackAnnotation().TryGetCachedResult(out var cached)); 1004Assert.True(annotation.AsCallbackAnnotation().TryGetCachedResult(out var cachedAfter)); 1176private static async Task<ResourceSnapshot> ReadSnapshotAsync(IAsyncEnumerator<ResourceSnapshot> enumerator, Func<ResourceSnapshot, bool> predicate) 1431var waitTask = target.WaitForResourceAsync(new WaitForResourceRequest 1470var waitTask = target.WaitForResourceAsync(new WaitForResourceRequest
Backchannel\GetTerminalInfoAsyncTests.cs (1)
338private async Task<FakeControlHost> StartFakeControlHostAsync(TerminalHostSessionInfo session)
Dashboard\DashboardEventHandlersTests.cs (1)
999public Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dashboard\DashboardResourceTests.cs (2)
892public Task<LogMessage> FirstLogTask => _tcs.Task; 930public Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dashboard\DashboardServiceTests.cs (8)
228var readUpdateTask = writer.ReadNextAsync().DefaultTimeout(); 490var resultTask = interactionService.PromptMessageBoxAsync( 561var resultTask = interactionService.PromptInputAsync( 609var resultTask = interactionService.PromptInputAsync( 1080var resultTask = interactionService.PromptInputsAsync("Inputs", "Enter values", [fileInput, textInput]); 1118var resultTask = interactionService.PromptInputAsync("Upload", "Select a file", input); 1154var readAllBytesTask = file.ReadAllBytesAsync(); 1182var resultTask = interactionService.PromptInputAsync("Upload", "Select a file", input);
Dcp\DcpExecutorTests.cs (12)
1614var moveNextTask = watchLogsEnumerator.MoveNextAsync().AsTask(); 1715var watchLogsTask1 = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs1, targetLogCount: 8); 1737var watchLogsTask2 = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs2, targetLogCount: 8); 3268var watchLogsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs, targetLogCount: 3); 3329var watchLogsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs, targetLogCount: 4); 3393var watchLogsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs, targetLogCount: 2); // 1 DCP system log + 1 certificate authority message 3419private static async Task<LogStreamPipes> GetStreamPipesAsync(Channel<(string Type, Pipe Pipe)> logStreamPipesChannel) 5319private static async Task<string> CreateOtlpServiceInstanceIdAsync(Action<IDistributedApplicationBuilder> configureBuilder) 6673async Task<TestMauiLaunchConfiguration> (context) => 8125static Task<ProjectLaunchConfiguration> CreateProjectLaunchConfiguration(string mode, CancellationToken cancellationToken) 8444static Task<ExecutableLaunchConfiguration> ThrowingLaunchConfiguration(string mode, CancellationToken cancellationToken) 10266private static async Task<string?> GetPlainExecutableSslCertDirAsync(Action<IResourceBuilder<TestExecutableResource>>? configure = null)
Dcp\DcpHostNotificationTests.cs (1)
1090public Task<DcpInfo?> GetDcpInfoAsync(bool force = false, CancellationToken cancellationToken = default)
Dcp\ExecutableLaunchPlanTests.cs (1)
261private static Task<ExecutableLaunchPlan> ResolveLaunchPlanAsync(
Dcp\GatedReadStream.cs (1)
52public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Dcp\KubernetesServiceTests.cs (6)
36var listTask = service.ListAsync<Container>(cancellationToken: cts.Token); 57var listTask = service.ListAsync<Container>(cancellationToken: cts.Token); 84var listTask = service.ListAsync<Container>(cancellationToken: cts.Token); 153var watchTask = watchEnumerator.MoveNextAsync().AsTask(); 185var listTask = service.ListAsync<Container>(cancellationToken: cts.Token); 411public static async Task<TestDcpApiServer> StartAsync(
Dcp\TestKubernetesService.cs (6)
47public Task<T> GetAsync<T>(string name, string? namespaceParameter = null, CancellationToken _ = default) where T : CustomResource, IKubernetesStaticMetadata 68public Task<T> CreateAsync<T>(T obj, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata 253public async Task<T> DeleteAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata 273public Task<List<T>> ListAsync<T>(string? namespaceParameter = null, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata 316public Task<Stream> GetLogStreamAsync<T>( 331public Task<T> PatchAsync<T>(T obj, V1Patch patch, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata
DebugSupportExtensionsTests.cs (1)
465private static Task<object> CreateLaunchConfigurationForTestAsync(
DistributedApplicationTests.cs (2)
2142async Task<ParentScopedResourcesRun> StartParentScopedResourcesAsync(int parentProcessId, CancellationToken cancellationToken) 2351private static Task<Service> WaitForAllocatedProxylessServiceAsync(IKubernetesService kubernetesService, RedisResource redis, EndpointReference endpoint, CancellationToken cancellationToken = default)
ExecutableResourceBuilderExtensionTests.cs (1)
177Assert.Equal(CreateAsyncProducerGuardMessage(typeof(Task<ExecutableLaunchConfiguration>), "launchConfigurationProducer"), exception.Message);
ExpressionResolverTests.cs (1)
35async Task<ResolvedValue> ResolveAsync() => await ExpressionResolver.ResolveAsync(testData.ValueProvider, context, CancellationToken.None);
InteractionServiceTests.cs (29)
27var resultTask = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 52var resultTask = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation", cancellationToken: cts.Token); 76var resultTask1 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 77var resultTask2 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 78var resultTask3 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 136var resultTask1 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 140var resultTask2 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 363var resultTask = interactionService.PromptInputAsync( 400var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 423var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 446var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 467var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 490var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 523var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 861var resultTask = interactionService.PromptInputsAsync("Login", "Please enter credentials", inputs); 926var resultTask = interactionService.PromptInputsAsync("Login", "Please enter credentials", inputs); 981var resultTask = interactionService.PromptInputsAsync("Login", "Please enter credentials", inputs); 1044var resultTask = interactionService.PromptInputsAsync("Validation Test", "Test validation", inputs, options); 1157var resultTask = interactionService.PromptProgressAsync("Please wait", new ProgressInteractionOptions 1190var resultTask = interactionService.PromptProgressAsync("Please wait", new ProgressInteractionOptions 1224var resultTask = interactionService.PromptProgressAsync("Please wait", new ProgressInteractionOptions 1257var resultTask = interactionService.PromptProgressAsync("Please wait", new ProgressInteractionOptions { Title = "Working..." }, cancellationToken: cts.Token); 1276var resultTask = interactionService.PromptProgressAsync("Please wait", new ProgressInteractionOptions 1298var resultTask = interactionService.PromptProgressAsync("Please wait...", cancellationToken: cts.Token); 1353var resultTask = interactionService.PromptInputAsync("Select file", "please", input); 1382var resultTask = interactionService.PromptInputAsync("Select file", "please", input); 1407var resultTask = interactionService.PromptInputAsync("Select file", "please", input, cancellationToken: cancellationTokenSource.Token); 1426var resultTask = interactionService.PromptInputAsync("Enter text", "please", input); 1450var resultTask = interactionService.PromptInputAsync("Enter text", "please", input);
Lifecycle\TerminalHostFailureDiagnosticServiceTests.cs (3)
259private static async Task<CustomResourceSnapshot> ReadCurrentSnapshotAsync(ResourceNotificationService notifications, IResource host) 271private static async Task<IReadOnlyList<LogLine>> ReadLogsAsync(ResourceLoggerService loggers, IResource host, int expected, int? timeoutMs = null) 295private static async Task<bool> TryReadAnyLogAsync(ResourceLoggerService loggers, IResource host)
Orchestrator\ApplicationOrchestratorTests.cs (2)
1168public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1173public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default)
Orchestrator\ParameterProcessorTests.cs (7)
336var logsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(loggerService, 1, parameterWithMissingValue); 360var logsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(loggerService, 1, parameterWithError); 391var logsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(loggerService, 1, parameter); 1304public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1309public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1661public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1671public Task<DeploymentStateSection> AcquireCurrentSectionAsync(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)
43async static Task<(string ProjectFilePath, string LaunchSettingsFilePath)> PrepareProjectWithTrailingCommasInLaunchSettingsAsync(string projectDirectoryPath) 91async static Task<(string ProjectFilePath, string LaunchSettingsFilePath)> PrepareProjectWithMalformedLaunchSettingsAsync(string projectDirectoryPath)
Publishing\ContainerRuntimeBaseTests.cs (5)
354public override Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken) 376public Task<string> RunCommandForOutputAsync(CancellationToken cancellationToken = default) 392public Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken) => Task.FromResult(true); 408public Task<IReadOnlyList<ComposeServiceInfo>?> ComposeListServicesAsync(ComposeOperationContext context, CancellationToken cancellationToken) 418public (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
Publishing\ContainerRuntimeResolverTests.cs (3)
45var task1 = resolver.ResolveAsync(); 46var task2 = resolver.ResolveAsync(); 73Task<IContainerRuntime>? firstTask = null;
Publishing\PipelineActivityReporterTests.cs (6)
571var promptTask = _interactionService.PromptInputAsync("Test Prompt", "test-description", "text-label", "test-placeholder"); 596var promptTask = _interactionService.PromptInputAsync("Test Prompt", "test-description", "text-label", "test-placeholder"); 625var promptTask = _interactionService.PromptInputAsync("Test Prompt", "test-description", "text-label", "test-placeholder"); 657var promptTask = _interactionService.PromptInputAsync("Upload", "Select a file", input); 697var promptTask = _interactionService.PromptInputAsync("Upload", "Select a file", input, cancellationToken: cancellationTokenSource.Token); 724var notificationTask = _interactionService.PromptNotificationAsync("Test Notification", "This is a test notification message", notificationOptions);
RequiredCommandAnnotationTests.cs (3)
43Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>> callback = 88Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>> callback = 320Task<RequiredCommandValidationResult> callback(RequiredCommandValidationContext _)
ResourceCommandServiceTests.cs (4)
1292var resultTask = app.ResourceCommands.ExecuteCommandAsync( 1364var resultTask = app.ResourceCommands.ExecuteCommandAsync( 1750var resultTask = app.ResourceCommands.ExecuteCommandAsync("myResource", "cancelable-command"); 1804var resultTask = app.ResourceCommands.ExecuteCommandAsync("myResource", "cancelable-command");
ResourceLoggerServiceTests.cs (8)
26var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 2); 67var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(service, 2, testResource); 107var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 2); 163var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 1); 228var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator, 4); 681var watchTask = Task.Run(async () => 715var watchTask = Task.Run(async () => 746var watchTask = Task.Run(async () =>
ResourceNotificationTests.cs (18)
78var watchTask = Task.Run(async () => 102async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellationToken) 120var enumerableTask = GetValuesAsync(cts.Token); 180async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellation) 198var enumerableTask = GetValuesAsync(cts.Token); 300var waitTask = notificationService.WaitForResourceAsync("myResource1", ["SomeState", "SomeOtherState"]); 315var waitTask = notificationService.WaitForResourceAsync("myResource1", ["SomeState", "SomeOtherState"], default); 1038async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellationToken) 1056var enumerableTask = GetValuesAsync(cts.Token); 1098async Task<ResourceEvent> GetFirstValueAsync(CancellationToken cancellationToken) 1108var enumerableTask = GetFirstValueAsync(cts.Token); 1134async Task<ResourceEvent> GetFirstValueAsync(CancellationToken cancellationToken) 1144var enumerableTask = GetFirstValueAsync(cts.Token); 1275var waitTask = notificationService.WaitForResourceHealthyAsync("myResource"); 1320var waitTask = notificationService.WaitForResourceHealthyAsync("myResource"); 1345var waitTask = notificationService.WaitForResourceHealthyAsync("myResource"); 1401var waitTask = notificationService.WaitForResourceHealthyAsync("does-not-exist", WaitBehavior.WaitOnResourceUnavailable, cts.Token); 1408private static async Task<bool> PublishAndGetIsHiddenAsync<T>(
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 (5)
10public static async Task<IReadOnlyList<LogLine>> CaptureLogsAsync(ResourceLoggerService service, string resourceName, int targetLogCount, Action writeLogs) 13var watchTask = WatchForLogsAsync(service.WatchAsync(resourceName), targetLogCount); 33public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(ResourceLoggerService service, int targetLogCount, IResource resource) 39public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerable<IReadOnlyList<LogLine>> watchEnumerable, int targetLogCount) 56public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerator<IReadOnlyList<LogLine>> watchEnumerator, int targetLogCount)
tests\Shared\TestInteractionService.cs (8)
27public Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 32public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 37public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 45public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 60public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 67public async Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 76public async Task<InteractionResult<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default) 90var completionTask = data.CompletionTcs.Task;
tests\Shared\TestPipelineActivityReporter.cs (4)
157public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 161public Task<IReportingStep> CreateStepAsync(string title, string? parentStepId, int hierarchyLevel, CancellationToken cancellationToken = default) 205public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 244public 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(() => 216var tasks = new List<Task<bool>>(); 320var tasks = new List<Task<string>>();
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();
WithHttpCommandTests.cs (2)
564protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 592protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
WithProcessCommandTests.cs (1)
1472var commandTask = app.ResourceCommands.ExecuteCommandAsync(resource.Resource, "wait", cts.Token);
WithTerminalTests.cs (3)
1306private static async Task<List<string>> GetResolvedCommandLineArgsAsync(TerminalHostResource host) 1341private static async Task<DistributedApplicationModel> BuildAndPublishBeforeStartAsync(IDistributedApplicationTestingBuilder builder) 1386private static async Task<TerminalHostOrphanCleanupService> SubscribeOrphanCleanupAsync(
WithVolumeTests.cs (1)
168async Task<string> GetVolumePathAsync(bool usePersistentLifetime)
Aspire.Hosting.TestUtilities (29)
Dcp\TestDcpDependencyCheckService.cs (1)
9public Task<DcpInfo?> GetDcpInfoAsync(bool force = false, CancellationToken cancellationToken = default)
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(
Publishing\FakeContainerRuntime.cs (6)
39public Func<string, CancellationToken, Task<ContainerImageManifestInspectionResult>>? InspectImageManifestAsyncCallback { get; set; } 44public Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken) 117public Task<ContainerImageConfigInspectionResult> InspectImageConfigAsync(string imageName, CancellationToken cancellationToken) 130public Task<ContainerImageManifestInspectionResult> InspectImageManifestAsync(string imageName, CancellationToken cancellationToken) 178public Task<IReadOnlyList<ComposeServiceInfo>?> ComposeListServicesAsync(ComposeOperationContext context, CancellationToken cancellationToken) 183public Task<IContainerRuntime> ResolveAsync(CancellationToken cancellationToken = default)
Utils\DockerfileUtils.cs (1)
38public static async Task<TemporaryDockerfileContext> CreateTemporaryDockerfileAsync(ITestOutputHelper outputHelper, string dockerfileName = "Dockerfile", bool createDockerfile = true, bool includeSecrets = false)
Utils\DockerUtils.cs (1)
38Func<string?, CancellationToken, Task<ContainerRuntimeInfo?>> runtimeDetector)
Utils\Grpc\TestAsyncStreamReader.cs (1)
35public async Task<bool> MoveNext(CancellationToken cancellationToken)
Utils\Grpc\TestServerStreamWriter.cs (1)
33public async Task<T> ReadNextAsync()
Utils\LaunchConfigurationTestHelpers.cs (1)
25public static Task<object> InvokeLaunchConfigurationProducerAsync(
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)
Utils\PersistentContainerTestHelpers.cs (2)
88async Task<ResourceRunSnapshot[]> RunContainerAsync() 126private static async Task<ResourceRunSnapshot> GetContainerIdentityAsync(ResourceNotificationService resourceNotificationService, string resourceName, bool includeUrls, CancellationToken cancellationToken)
Utils\TestPackageFetcher.cs (3)
11private readonly Task<List<NuGetPackage>> _versionTask; 15public TestPackageFetcher(Task<List<NuGetPackage>>? versionTask = null) 20public Task<List<NuGetPackage>> TryFetchPackagesAsync(string appHostDirectory, CancellationToken cancellationToken)
Utils\TestProcessRunner.cs (4)
60public void EnqueuePending(Task<ProcessResult> processResult) 68public (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec) 117Task<ProcessResult>? PendingResult) 138public static TestProcessRun Pending(Task<ProcessResult> pendingResult)
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.Managed.Tests (6)
TerminalHostSignalTests.cs (6)
43var standardOutputTask = process.StandardOutput.ReadToEndAsync(); 44var standardErrorTask = process.StandardError.ReadToEndAsync(); 110var parentStandardOutputTask = parentProcess.StandardOutput.ReadToEndAsync(); 111var parentStandardErrorTask = parentProcess.StandardError.ReadToEndAsync(); 140var standardOutputTask = process.StandardOutput.ReadToEndAsync(); 141var standardErrorTask = process.StandardError.ReadToEndAsync();
Aspire.Microsoft.Azure.Cosmos (1)
AzureCosmosDbHealthCheck.cs (1)
24public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
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 (16)
BlazorWasmHostingTests.cs (1)
196private async Task<Aspire.Hosting.DistributedApplication> CreateAppAsync(Type appHostType, bool enableDashboard = false)
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\Aspire.TestUtilities\TestcontainersPodmanConfiguration.cs (1)
259var standardOutput = process.StandardOutput.ReadToEndAsync();
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)
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)
20public 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)
Aspire.TerminalHost (8)
DcpUpstreamAdapter.cs (3)
61private readonly Func<CancellationToken, Task<Stream>> _streamFactory; 81Func<CancellationToken, Task<Stream>> streamFactory, 441private static async Task<bool> ReadExactAsync(Stream stream, byte[] buffer, CancellationToken ct)
TerminalHostApp.cs (2)
102public async Task<int> RunAsync(CancellationToken cancellationToken) 254public static async Task<int> RunAsync(string[] args, CancellationToken cancellationToken)
TerminalHostControlRpcTarget.cs (2)
29public Task<TerminalHostSessionInfo> GetSessionAsync(CancellationToken cancellationToken = default) 46public Task<TerminalHostInfoResponse> GetInfoAsync(CancellationToken cancellationToken = default)
TerminalHostProcessRunner.cs (1)
19public static async Task<int> RunAsync(string[] args, CancellationToken cancellationToken = default)
Aspire.TerminalHost.Tests (27)
TerminalHostAppTests.cs (18)
54var hostTask = app.RunAsync(hostCts.Token); 77var hostTask = app.RunAsync(hostCts.Token); 109var hostTask = app.RunAsync(hostCts.Token); 137var hostTask = app.RunAsync(hostCts.Token); 184static async Task<bool> TryGetInfoAsync(Socket socket) 214var hostTask = app.RunAsync(hostCts.Token); 267var hostTask = app.RunAsync(hostCts.Token); 305var hostTask = app.RunAsync(hostCts.Token); 391var hostTask = app.RunAsync(hostCts.Token); 436var hostTask = app.RunAsync(hostCts.Token); 473var hostTask = app.RunAsync(hostCts.Token); 587public async Task<byte[]> WaitForMatchingFrameAsync( 602public async Task<(byte Type, byte[] Payload)> ReadFrameAsync(CancellationToken ct) 665private static async Task<TestHmp1Producer> ConnectProducerAsync(string socketPath, TimeSpan timeout) 713public static async Task<TestHmp1Consumer> ConnectAsync(string socketPath, TimeSpan timeout) 792private static async Task<JsonRpc> OpenControlRpcAsync(string socketPath) 828var hostTask = app.RunAsync(hostCts.Token); 865var hostTask = app.RunAsync(hostCts.Token);
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.TestTools (13)
GitHubActionsApi.cs (3)
19public static async Task<List<GitHubActionsJob>> ListJobsAsync(string repository, long runId, int? runAttempt, CancellationToken cancellationToken) 55public static async Task<List<GitHubActionsArtifact>> ListArtifactsAsync(string repository, long runId, CancellationToken cancellationToken) 91public static Task<string> DownloadJobLogAsync(string repository, long jobId, CancellationToken cancellationToken)
GitHubCli.cs (10)
16public static async Task<JsonDocument> GetJsonAsync(string endpoint, CancellationToken cancellationToken) 22public static Task<string> GetStringAsync(string endpoint, CancellationToken cancellationToken) 28public static Task<string> GetStringAsync(string endpoint, bool allowEscapeSequences, CancellationToken cancellationToken) 76public static async Task<(int Number, string Url)> CreateIssueAsync( 118public static async Task<(int Number, string Url, string State)?> SearchExistingIssueAsync( 236internal static Func<IReadOnlyList<string>, CancellationToken, Task<string>>? GhInvokerOverride { get; set; } 238private static async Task<string> RunGhAsync(IReadOnlyList<string> arguments, CancellationToken cancellationToken) 268var stdoutTask = process.StandardOutput.ReadToEndAsync(cts.Token); 269var stderrTask = process.StandardError.ReadToEndAsync(cts.Token); 322var stderrTask = process.StandardError.ReadToEndAsync(cts.Token);
Aspire.TestUtilities (1)
TestcontainersPodmanConfiguration.cs (1)
259var standardOutput = process.StandardOutput.ReadToEndAsync();
AzureFunctionsEndToEnd.Functions (1)
MyAzureBlobTrigger.cs (1)
11public async Task<string> RunAsync([BlobTrigger("myblobcontainer/{name}", Connection = "blob")] string triggerString, FunctionContext context)
AzureFunctionsWithDts.Functions (1)
MyOrchestrationTrigger.cs (1)
8public static async Task<object> Run(
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) 97public 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) =>
BlazorHosted.ClientServiceDefaults (1)
BackgroundExportHandler.cs (1)
19protected override Task<HttpResponseMessage> SendAsync(
BlazorStandalone.ClientServiceDefaults (1)
BackgroundExportHandler.cs (1)
19protected override Task<HttpResponseMessage> SendAsync(
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) 232var 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)
100internal static async Task<bool> RunServerShutdownRequestAsync( 178internal static Task<BuildResponse> RunServerBuildRequestAsync( 198internal static async Task<BuildResponse> RunServerBuildRequestAsync( 221static Task<NamedPipeClientStream?> tryConnectToServerAsync( 298static async Task<BuildResponse> tryRunRequestAsync( 321var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 392internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
dotnet-aot (48)
parent\dotnet\Commands\Test\MTP\IPC\HttpTestHostGateway.cs (3)
19private readonly Func<IRequest, Task<IResponse>> _callback; 29Func<IRequest, Task<IResponse>> callback, 289private static async Task<byte[]> ReadFrameAsync(HttpListenerRequest request, CancellationToken cancellationToken)
parent\dotnet\Commands\Test\MTP\IPC\NamedPipeServer.cs (2)
16private readonly Func<NamedPipeServer, IRequest, Task<IResponse>> _callback; 29Func<NamedPipeServer, IRequest, Task<IResponse>> callback,
parent\dotnet\Commands\Test\MTP\TestApplication.cs (4)
85public async Task<int> RunAsync(CtrlCCancellationManager ctrlC) 664private Task<IResponse> OnControlRequest(NamedPipeServer _, IRequest request) 711private Task<IResponse> OnHttpRequest(IRequest request) 722private Task<IResponse> OnRequest(NamedPipeServer? server, IRequest request)
parent\dotnet\Commands\Test\MTP\TestRunPolicy.cs (1)
63public Task<TestRunCancellationReason> Cancellation => _cancellation.Task;
parent\dotnet\Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (3)
185private async Task<bool> UpdateManifestWithVersionAsync( 347private async Task<bool> UpdatedAdManifestPackagesExistAsync() 355private async Task<bool> NewerManifestPackageExists(ManifestId manifest)
parent\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,
parent\dotnet\NugetPackageDownloader\NuGetPackageDownloader.cs (22)
157public async Task<string> DownloadPackageAsync(PackageId packageId, 299public async Task<string> GetPackageUrl(PackageId packageId, 322public async Task<IEnumerable<string>> ExtractPackageAsync(string packagePath, DirectoryPath targetFolder) 373public async Task<IEnumerable<IPackageSearchMetadata>> GetLatestVersionsOfPackage(string packageId, bool includePreview, int numberOfResults) 379private async Task<(PackageSource, NuGetVersion)> GetPackageSourceAndVersion(PackageId packageId, 640private async Task<(PackageSource, IPackageSearchMetadata)> GetMatchingVersionInternalAsync( 721private async Task<(PackageSource, IPackageSearchMetadata)> GetLatestVersionInternalAsync( 728private async Task<IEnumerable<(PackageSource, IPackageSearchMetadata)>> GetLatestVersionsInternalAsync( 795public async Task<NuGetVersion> GetBestPackageVersionAsync(PackageId packageId, 809public async Task<(NuGetVersion version, PackageSource source)> GetBestPackageVersionAndSourceAsync(PackageId packageId, 823private async Task<(PackageSource, IPackageSearchMetadata)> GetPackageMetadataAsync(string packageIdentifier, 838List<Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)>> tasks = [.. sources 870foreach (Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)> task in tasks) 883Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)> finishedTask = 906private async Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)> 948public async Task<NuGetVersion> GetLatestPackageVersion(PackageId packageId, 955public async Task<IEnumerable<NuGetVersion>> GetLatestPackageVersions(PackageId packageId, int numberOfResults, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) 965public async Task<IEnumerable<string>> GetPackageIdsAsync(string idStem, bool allowPrerelease, PackageSourceLocation packageSourceLocation = null, CancellationToken cancellationToken = default) 980public async Task<IEnumerable<NuGetVersion>> GetPackageVersionsAsync(PackageId packageId, string versionPrefix = null, bool allowPrerelease = false, PackageSourceLocation packageSourceLocation = null, CancellationToken cancellationToken = default) 994private async Task<IEnumerable<AutoCompleteResource>> GetAutocompleteAsync(PackageSource source, CancellationToken cancellationToken) 1007private async Task<IEnumerable<NuGetVersion>> GetPackageVersionsForSource(AutoCompleteResource autocomplete, PackageId packageId, string versionPrefix, bool allowPrerelease, CancellationToken cancellationToken) 1026private static async Task<IEnumerable<string>> GetPackageIdsForSource(AutoCompleteResource autocomplete, PackageId packageId, bool allowPrerelease, CancellationToken cancellationToken)
parent\dotnet\NugetSearch\INugetToolSearchApiRequest.cs (1)
10Task<string> GetResult(NugetSearchApiParameter nugetSearchApiParameter);
parent\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()
parent\dotnet\Parser.cs (2)
358public static Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default) => parseResult.InvokeAsync(InvocationConfiguration, cancellationToken); 360public 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( 121private static async Task<LoadedWorkspace?> OpenMSBuildWorkspaceAsync( 142private static async Task<Solution> RunCodeFormattersAsync( 167internal 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<LoadedWorkspace?> 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) 246internal async Task<int> RunAsync() 347private 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;
DotNetInvocationHostedAgent (2)
EchoAIAgent.cs (1)
17protected override Task<AgentResponse> RunCoreAsync(
EchoInvocationHandler.cs (1)
23private static async Task<string> ReadInputAsync(HttpRequest request, CancellationToken cancellationToken)
GenerateDocumentationAndConfigFiles (180)
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)
337public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
612Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
596public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 607public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 618public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
98private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 228async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 260public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 262Task<(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 (1)
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) 599Task<bool> ValidateTypeHelper(TypeDesc typeDesc) 619Task<bool> ValidateTypeHelperInstantiatedType(InstantiatedType instantiatedType) 639async Task<bool> ValidateTypeHelperFunctionPointerType(FunctionPointerType functionPointerType)
ILLink.CodeFixProvider (2)
BaseAttributeCodeFixProvider.cs (1)
53private async Task<Document> AddAttributeAsync(
DynamicallyAccessedMembersCodeFixProvider.cs (1)
127private static async Task<Document> AddAttributeAsync(
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 (91)
CreateFailingTestIssue\CreateFailingTestIssueFixture.cs (2)
45var stdoutTask = process.StandardOutput.ReadToEndAsync(); 46var stderrTask = process.StandardError.ReadToEndAsync();
CreateFailingTestIssue\CreateFailingTestIssueToolTests.cs (3)
620private async Task<ToolResult> RunToolAsync(string fixtureDirectory, params string[] args) 650var stdoutTask = process.StandardOutput.ReadToEndAsync(); 651var stderrTask = process.StandardError.ReadToEndAsync();
CreateFailingTestIssue\GitHubCliArgumentTests.cs (2)
47private static async Task<IReadOnlyList<string>> CaptureArgumentsAsync(Func<Task<string>> call)
DownloadFailingJobLogs\DownloadFailingJobLogsToolTests.cs (3)
85private async Task<ToolResult> RunToolAsync(string fixtureDirectory) 106var stdoutTask = process.StandardOutput.ReadToEndAsync(); 107var stderrTask = process.StandardError.ReadToEndAsync();
ExtractTestPartitions\ExtractTestPartitionsTests.cs (2)
281private async Task<ToolResult> RunTool(string assemblyPath, string outputFile) 286private async Task<ToolResult> RunToolRaw(params string[] args)
GenerateTestSummary\GenerateTestSummaryFixture.cs (2)
38var stdoutTask = process.StandardOutput.ReadToEndAsync(); 39var stderrTask = process.StandardError.ReadToEndAsync();
GenerateTestSummary\GenerateTestSummaryToolTests.cs (3)
238private async Task<ToolResult> RunToolAsync(string trxPath, params string[] extraArgs) 267var stdoutTask = process.StandardOutput.ReadToEndAsync(); 268var stderrTask = process.StandardError.ReadToEndAsync();
Pipelines\NixCliPackageTests.cs (5)
213private static async Task<JsonObject> ReadJsonObjectAsync(string relativePath) 220private static async Task<CommandResult> RunBashAsync(string scriptPath, string[] arguments, Dictionary<string, string?> environment) 241var outputTask = process.StandardOutput.ReadToEndAsync(); 242var errorTask = process.StandardError.ReadToEndAsync(); 251private static Task<string> ReadRepoFileAsync(string relativePath)
Pipelines\NpmCliPackageTests.cs (4)
571private Task<string> ReadRepoFileAsync(string relativePath) 574private async Task<string> CreateFakeNpmInstallAsync(bool includeRidPackages) 639private async Task<PackedNpmPackage> PackCliNpmPackageAsync(string rid) 669private async Task<string> RenderTemplateAsync(string templateRelativePath, params (string Name, string Value)[] values)
Pipelines\ReleasePublishNugetPipelineTests.cs (1)
803private Task<string> ReadRepoFileAsync(string relativePath)
PowerShellScripts\AspireSkillsBundleHashTests.cs (3)
80private async Task<string> RunHashDriverAsync(string inputPath) 115private async Task<string[]> RunHookNamesDriverAsync() 140private async Task<CommandResult> RunDriverAsync(string driverPath, params string[] args)
PowerShellScripts\BuildTestMatrixTests.cs (1)
734private async Task<CommandResult> RunScript(string artifactsDir, string outputFile)
PowerShellScripts\DownloadNativeArchivesTests.cs (1)
378private async Task<CommandResult> RunScript(
PowerShellScripts\ExpandTestMatrixGitHubTests.cs (1)
614private async Task<CommandResult> RunScript(
PowerShellScripts\PowerShellCommand.cs (2)
56public async Task<CommandResult> ExecuteAsync(params string[] args) 81private async Task<CommandResult> ExecuteAsyncInternal(CancellationToken token, string[] args)
PowerShellScripts\SplitTestMatrixByDepsTests.cs (1)
227private async Task<CommandResult> RunScript(
PowerShellScripts\SplitTestProjectsTests.cs (1)
181private async Task<CommandResult> RunScript(
PowerShellScripts\StageNativeCliToolPackagesTests.cs (1)
286private async Task<CommandResult> RunScript(string downloadRoot, string shippingDir, params string[] additionalArgs)
PowerShellScripts\ValidateNpmPackageSignaturesTests.cs (1)
202private async Task<CommandResult> RunScript(string shippingDir)
PowerShellScripts\ValidateNpmReleaseAliasesTests.cs (1)
177private async Task<CommandResult> RunValidation(string owners, string approvers, string requiredOwners = RequiredOwners)
PowerShellScripts\WriteClassModeTestPropsTests.cs (1)
114private async Task<CommandResult> RunScript(string artifactsDir, string outputPropsPath)
tools\GenerateCITimeline\GitHubApi.cs (4)
9public static async Task<JsonElement> CallAsync(string endpoint) 19var stdoutTask = process.StandardOutput.ReadToEndAsync(); 20var stderrTask = process.StandardError.ReadToEndAsync(); 130public static async Task<(JsonElement RunInfo, List<JsonElement> Jobs)> FetchRunDataAsync(string repo, string runId)
WorkflowScripts\AutoRerunTransientCiFailuresTests.cs (4)
2190private async Task<AnalyzeFailedJobsResult> AnalyzeSingleJobAsync(WorkflowJob job, string annotationsOrText, string jobLogText = "") 2202private Task<AnalyzeFailedJobsResult> AnalyzeJobsAsync( 2219private async Task<T> InvokeHarnessAsync<T>(string operation, object payload) 2255private Task<string> ReadRepoFileAsync(string relativePath)
WorkflowScripts\CreateFailingTestIssueWorkflowTests.cs (1)
268private async Task<T> InvokeHarnessAsync<T>(string operation, object payload)
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (10)
310private async Task<CommandResult> RunGateScriptAsync(IReadOnlyDictionary<string, string?>? environment = null) 313private static async Task<CommandResult> RunGateScriptAsync(string workingDirectory, IReadOnlyDictionary<string, string?>? environment = null) 336var stdoutTask = process.StandardOutput.ReadToEndAsync(); 337var stderrTask = process.StandardError.ReadToEndAsync(); 344private async Task<ReleaseBranchRepository> CreateReleaseBranchRepositoryAsync( 466private async Task<string> GetHeadShaAsync() 469private async Task<string> GetHeadShaAsync(string workingDirectory) 484private async Task<CommandResult> RunProcessAsync(string fileName, IEnumerable<string> args, string workingDirectory) 500var stdoutTask = process.StandardOutput.ReadToEndAsync(); 501var stderrTask = process.StandardError.ReadToEndAsync();
WorkflowScripts\ExtensionReleaseWorkflowTests.cs (16)
582private async Task<string> GenerateDeterministicReleaseNotesAsync(string pythonExecutable, IEnumerable<string> commitLines, string? lineEnding = null) 611var stdoutTask = process.StandardOutput.ReadToEndAsync(); 612var stderrTask = process.StandardError.ReadToEndAsync(); 641private async Task<CommandResult> RunPythonScriptAsync(string pythonExecutable, string scriptPath, IEnumerable<string> args) 663var stdoutTask = process.StandardOutput.ReadToEndAsync(); 664var stderrTask = process.StandardError.ReadToEndAsync(); 726private async Task<CommandResult> RunBashSyntaxCheckAsync(string script) 742var stdoutTask = process.StandardOutput.ReadToEndAsync(); 743var stderrTask = process.StandardError.ReadToEndAsync(); 753private async Task<CommandResult> RunBashScriptAsync(string scriptPath, IEnumerable<string> args, IReadOnlyDictionary<string, string?> environment) 779var stdoutTask = process.StandardOutput.ReadToEndAsync(); 780var stderrTask = process.StandardError.ReadToEndAsync(); 790private async Task<FakeGhFixture> CreateFakeGhAsync(string rootDirectory) 829private async Task<CommandResult> RunBashCommandAsync(string command) 845var stdoutTask = process.StandardOutput.ReadToEndAsync(); 846var stderrTask = process.StandardError.ReadToEndAsync();
WorkflowScripts\MonitorScheduledWorkflowsIntegrationTests.cs (1)
390private async Task<MonitorResult> InvokeAsync(object scenario)
WorkflowScripts\MonitorScheduledWorkflowsTests.cs (1)
243private async Task<T> InvokeHarnessAsync<T>(string operation, object payload)
WorkflowScripts\NodeCommand.cs (2)
50public async Task<CommandResult> ExecuteScriptAsync(string scriptPath, params string[] args) 75private async Task<CommandResult> ExecuteScriptAsyncInternal(string scriptPath, string[] args, CancellationToken token)
WorkflowScripts\PrDocsCheckWorkflowTests.cs (2)
210var stdoutTask = process.StandardOutput.ReadToEndAsync(); 211var stderrTask = process.StandardError.ReadToEndAsync();
WorkflowScripts\ReportCiFailureIntegrationTests.cs (1)
282private async Task<RunnerResult> InvokeAsync(object scenario)
WorkflowScripts\ReportCiFailureTests.cs (1)
79private async Task<T> InvokeHarnessAsync<T>(string operation, object payload)
WorkflowScripts\ReportPipelineFailureIntegrationTests.cs (1)
288private async Task<RunnerResult> InvokeAsync(object scenario)
WorkflowScripts\ReportPipelineFailureTests.cs (1)
137private async Task<T> InvokeHarnessAsync<T>(string operation, object payload)
WorkflowScripts\ReportSpecializedTestFailuresTests.cs (1)
226private async Task<T> InvokeHarnessAsync<T>(string operation, object payload)
WorkflowScripts\SelectTestsCommentScriptTests.cs (2)
221private async Task<CommentScriptResult> RunCommentScriptAsync(string commentFile, object context, params object[] existingComments) 227private async Task<CommentScriptResult> RunCommentScriptAsync(string commentFile, object context, string? liveHeadSha, object[] existingComments)
WorkflowScripts\SpecializedTestFailureRunnerTests.cs (1)
226private async Task<RunnerResult> InvokeAsync(object scenario)
WorkflowScripts\TrackingIssueTests.cs (1)
284private async Task<T> InvokeHarnessAsync<T>(string operation, object payload)
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)
44public Task<bool> RunAsync(Func<int, Task<RetryResult>> actionAsync) 49public async Task<bool> RunAsync( 50Func<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 (16)
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 (7)
62protected override Task<object> CreateEventsAsync() 69public virtual Task<bool> ShouldHandleRequestAsync() 76public virtual async Task<bool> HandleRequestAsync() 86private async Task<bool> HandleRequestCoreAsync() 195protected abstract Task<HandleRequestResult> HandleRemoteAuthenticateAsync(); 198protected override async Task<AuthenticateResult> HandleAuthenticateAsync() 294protected virtual async Task<HandleRequestResult> HandleAccessDeniedErrorAsync(AuthenticationProperties properties)
src\aspnetcore\src\Shared\RemoteAuthenticationAntiforgery.cs (2)
23public static async Task<bool> HandleWithoutAntiforgeryVerdictAsync(HttpContext context, Func<Task<bool>> handler)
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)
63protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new NegotiateEvents()); 71public async Task<bool> HandleRequestAsync() 266private async Task<bool?> InvokeAuthenticateFailedEvent(Exception ex) 294protected 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 (17)
OpenIdConnectHandler.cs (15)
87protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new OpenIdConnectEvents()); 90public override Task<bool> HandleRequestAsync() 113protected virtual async Task<bool> HandleRemoteSignOutAsync() 321protected virtual async Task<bool> HandleSignOutCallbackAsync() 613private async Task<string> GetPushedAuthorizationRequestUri(HttpResponseMessage parResponseMessage) 638protected override async Task<HandleRequestResult> HandleRemoteAuthenticateAsync() 993protected virtual async Task<OpenIdConnectMessage> RedeemAuthorizationCodeAsync(OpenIdConnectMessage tokenEndpointRequest) 1046protected virtual async Task<HandleRequestResult> GetUserInformationAsync( 1215private async Task<MessageReceivedContext> RunMessageReceivedEventAsync(OpenIdConnectMessage message, AuthenticationProperties? properties) 1239private async Task<TokenValidatedContext> RunTokenValidatedEventAsync(OpenIdConnectMessage authorizationResponse, OpenIdConnectMessage? tokenEndpointResponse, ClaimsPrincipal user, AuthenticationProperties properties, JwtSecurityToken jwt, string? nonce) 1265private async Task<AuthorizationCodeReceivedContext> RunAuthorizationCodeReceivedEventAsync(OpenIdConnectMessage authorizationResponse, ClaimsPrincipal? user, AuthenticationProperties properties, JwtSecurityToken? jwt) 1311private async Task<TokenResponseReceivedContext> RunTokenResponseReceivedEventAsync( 1340private async Task<UserInformationReceivedContext> RunUserInformationReceivedEventAsync(ClaimsPrincipal principal, AuthenticationProperties properties, OpenIdConnectMessage message, JsonDocument user) 1366private async Task<AuthenticationFailedContext> RunAuthenticationFailedEventAsync(OpenIdConnectMessage message, Exception exception) 1448private async Task<TokenValidationResult> ValidateTokenUsingHandlerAsync(string idToken, AuthenticationProperties properties, TokenValidationParameters validationParameters)
src\aspnetcore\src\Shared\RemoteAuthenticationAntiforgery.cs (2)
23public static async Task<bool> HandleWithoutAntiforgeryVerdictAsync(HttpContext context, Func<Task<bool>> handler)
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)
64/// <returns>A <see cref="Task{TResult}"/> that will be completed when the function has finished executing.</returns> 65public abstract Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem); 71/// <returns>A <see cref="Task{TResult}"/> that will be completed when the function has finished executing.</returns> 72public 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.AI (4)
Blocks\FunctionApprovalBlock.cs (1)
102public Task<AIContent> GetResultAsync(CancellationToken cancellationToken = default)
Blocks\IInteractiveBlock.cs (1)
18Task<AIContent> GetResultAsync(CancellationToken cancellationToken = default);
Blocks\UIActionBlock.cs (1)
75public Task<AIContent> GetResultAsync(CancellationToken cancellationToken = default)
Engine\UIAgent.cs (1)
237public async Task<IReadOnlyList<ContentBlock>> RestoreAsync(
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)
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)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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)
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)
84public async Task<CacheViewRenderState?> PrepareAsync(CacheView cacheView, HttpContext httpContext) 164var pending = state.PendingStoreTask; 195var pending = state.PendingStoreTask; 254private async Task ApplyDuplicateResolutionAsync(CacheViewRenderState state, string key, Task<SerializedRenderFragment?> resolution) 293var inflight = _store.GetOrCreateAsync( 348private async Task ObserveCacheStorePersistAsync(string key, Task<SerializedRenderFragment> pending) 364private static Dictionary<string, (CacheView Owner, Task<SerializedRenderFragment?> Task)> GetInFlightResolutions(HttpContext httpContext) 366if (httpContext.Items[_inFlightResolutionsItemKey] is not Dictionary<string, (CacheView Owner, Task<SerializedRenderFragment?> Task)> resolutions) 368resolutions = 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)
232protected override async Task<Stream> ReadJSDataAsStreamAsync(IJSStreamReference jsStreamReference, long totalLength, CancellationToken cancellationToken = default)
Circuits\RevalidatingServerAuthenticationStateProvider.cs (2)
58protected abstract Task<bool> ValidateAuthenticationStateAsync(AuthenticationState authenticationState, CancellationToken cancellationToken); 60private 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 (14)
Infrastructure\PlaywrightExtensions.cs (3)
72internal static async Task<TracingSession> TraceAsync( 92internal static async Task<TracedContext> NewTracedContextAsync( 126internal static async Task<TracedContext> NewTracedContextAsync(
Infrastructure\ResourceLock.cs (1)
52public static async Task<ResourceLock> CreateAsync(IPage page, Regex urlPattern)
Infrastructure\ServerFactory.cs (2)
24internal abstract Task<ServerInstance> StartServerAsync( 147internal override async Task<ServerInstance> StartServerAsync(
Infrastructure\TestLockClient.cs (1)
41public static async Task<TestLockClient> CreateAsync(
Infrastructure\TracedContext.cs (1)
52internal Task<IPage> NewPageAsync() => Context.NewPageAsync();
Infrastructure\TracingSession.cs (1)
56internal static async Task<TracingSession> StartAsync(
Playwright\BrowserTest.cs (3)
46public async Task<IBrowser> EnsureBrowserAsync() 86public async Task<IBrowserContext> NewContext(BrowserNewContextOptions? options = null) 100protected async Task<IBrowserContext> NewTracedContextAsync(
Playwright\PlaywrightTest.cs (1)
34public static async Task<IPlaywright> EnsurePlaywrightAsync()
Playwright\UITest.cs (1)
60protected async Task<ServerInstance> StartServerAsync<TApp>(
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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JSImports.g.cs (4)
251private static partial global::System.Threading.Tasks.Task<string> GetInitialUpdateCore() 263global::System.Threading.Tasks.Task<string> __retVal; 966public static partial global::System.Threading.Tasks.Task<bool> LoadLazyAssembly(string assemblyToLoad) 979global::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 (9)
parent\Shared\Server\ClientStreamingServerMethodInvoker.cs (2)
66private async Task<TResponse> ResolvedInterceptorInvoker(IAsyncStreamReader<TRequest> requestStream, ServerCallContext resolvedContext) 94public async Task<TResponse> Invoke(HttpContext httpContext, ServerCallContext serverCallContext, IAsyncStreamReader<TRequest> requestStream)
parent\Shared\Server\UnaryServerMethodInvoker.cs (7)
67private async Task<TResponse> ResolvedInterceptorInvoker(TRequest resolvedRequest, ServerCallContext resolvedContext) 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 (6)
ConnectionInfo.cs (1)
54public abstract Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken = new CancellationToken());
Features\IConnectionAuthenticationRefreshFeature.cs (1)
20Func<AuthenticationRefreshContext, Task<bool>> OnAuthenticationRefresh { get; set; }
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 (24)
HttpConnectionDispatcherOptions.cs (1)
157public Func<AuthenticationRefreshContext, Task<bool>>? OnAuthenticationRefresh { get; set; }
Internal\HttpConnectionContext.cs (13)
63private Func<AuthenticationRefreshContext, Task<bool>> _onAuthenticationRefresh = DefaultOnAuthenticationRefreshAsync; 151public Task<bool>? TransportTask { get; set; } 262public Func<AuthenticationRefreshContext, Task<bool>> OnAuthenticationRefresh 322internal async Task<UserUpdateResult> UpdateUserAsync( 326Func<AuthenticationRefreshContext, Task<bool>>? additionalAuthenticationRefresh = null, 331Func<AuthenticationRefreshContext, Task<bool>> callback; 451Func<AuthenticationRefreshContext, Task<bool>> callback, 465Func<AuthenticationRefreshContext, Task<bool>> callback) 470private async Task<bool> InvokeOnAuthenticationRefreshAsync(Func<AuthenticationRefreshContext, Task<bool>> callback, AuthenticationRefreshContext context) 491private static Task<bool> DefaultOnAuthenticationRefreshAsync(AuthenticationRefreshContext context) 840async Task<bool> Func() 902internal async Task<bool> CancelPreviousPoll(HttpContext context)
Internal\HttpConnectionDispatcher.cs (4)
747private async Task<bool> EnsureConnectionStateAsync(HttpConnectionContext connection, HttpContext context, HttpTransportType transportType, HttpTransportType supportedTransports, ConnectionLogScope logScope, HttpConnectionDispatcherOptions options) 1069private async Task<bool> RejectIfConnectionUserChangedAsync(HttpConnectionContext connection, HttpContext context) 1095private async Task<HttpConnectionContext?> GetConnectionAsync(HttpContext context) 1122private 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 (127)
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)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\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!);
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)
210protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
IPasskeyHandler.cs (8)
41Task<PasskeyCreationOptionsResult> MakeCreationOptionsAsync(PasskeyUserEntity userEntity, HttpContext httpContext); 65Task<PasskeyCreationOptionsResult> MakeCreationOptionsAsync(PasskeyUserEntity userEntity, bool isConditionallyMediated, HttpContext httpContext) 82Task<PasskeyRequestOptionsResult> MakeRequestOptionsAsync(TUser? user, HttpContext httpContext); 101Task<AllAcceptedCredentialsSignalOptionsResult> MakeAllAcceptedCredentialsSignalOptionsAsync(TUser user, HttpContext httpContext) 126Task<CurrentUserDetailsSignalOptionsResult> MakeCurrentUserDetailsSignalOptionsAsync(TUser user, PasskeyUserEntity userEntity, HttpContext httpContext) 150Task<UnknownCredentialSignalOptionsResult?> MakeUnknownCredentialSignalOptionsAsync(string credentialJson, HttpContext httpContext) 158Task<PasskeyAttestationResult> PerformAttestationAsync(PasskeyAttestationContext context); 165Task<PasskeyAssertionResult<TUser>> PerformAssertionAsync(PasskeyAssertionContext context);
PasskeyHandler.cs (12)
44public Task<PasskeyCreationOptionsResult> MakeCreationOptionsAsync(PasskeyUserEntity userEntity, HttpContext httpContext) 48public async Task<PasskeyCreationOptionsResult> MakeCreationOptionsAsync(PasskeyUserEntity userEntity, bool isConditionallyMediated, HttpContext httpContext) 100async Task<PublicKeyCredentialDescriptor[]> GetExcludeCredentialsAsync() 133public async Task<PasskeyRequestOptionsResult> MakeRequestOptionsAsync(TUser? user, HttpContext httpContext) 164async Task<PublicKeyCredentialDescriptor[]> GetAllowCredentialsAsync() 184public async Task<AllAcceptedCredentialsSignalOptionsResult> MakeAllAcceptedCredentialsSignalOptionsAsync(TUser user, HttpContext httpContext) 206public async Task<CurrentUserDetailsSignalOptionsResult> MakeCurrentUserDetailsSignalOptionsAsync(TUser user, PasskeyUserEntity userEntity, HttpContext httpContext) 236public async Task<UnknownCredentialSignalOptionsResult?> MakeUnknownCredentialSignalOptionsAsync(string credentialJson, HttpContext httpContext) 282public async Task<PasskeyAttestationResult> PerformAttestationAsync(PasskeyAttestationContext context) 306public async Task<PasskeyAssertionResult<TUser>> PerformAssertionAsync(PasskeyAssertionContext context) 334private async Task<PasskeyAttestationResult> PerformAttestationCoreAsync(PasskeyAttestationContext context) 495private async Task<PasskeyAssertionResult<TUser>> PerformAssertionCoreAsync(PasskeyAssertionContext context)
SecurityStampValidator.cs (1)
126protected virtual Task<TUser?> VerifySecurityStamp(ClaimsPrincipal? principal)
SignInManager.cs (47)
133public virtual async Task<ClaimsPrincipal> CreateUserPrincipalAsync(TUser user) => await ClaimsFactory.CreateAsync(user); 155public virtual async Task<bool> CanSignInAsync(TUser user) 201private async Task<(bool success, bool? isPersistent)> RefreshSignInCoreAsync(TUser user) 347public virtual async Task<TUser?> ValidateSecurityStampAsync(ClaimsPrincipal? principal) 370public virtual async Task<TUser?> ValidateTwoFactorSecurityStampAsync(ClaimsPrincipal? principal) 392public virtual async Task<bool> ValidateSecurityStampAsync(TUser? user, string? securityStamp) 407public virtual async Task<SignInResult> PasswordSignInAsync(TUser user, string password, 440public virtual async Task<SignInResult> PasswordSignInAsync(string userName, string password, 462public virtual async Task<SignInResult> CheckPasswordSignInAsync(TUser user, string password, bool lockoutOnFailure) 480private async Task<SignInResult> CheckPasswordSignInCoreAsync(TUser user, string password, bool lockoutOnFailure) 536public virtual async Task<string> MakePasskeyCreationOptionsAsync(PasskeyUserEntity userEntity) 564public virtual async Task<string> MakePasskeyCreationOptionsAsync(PasskeyUserEntity userEntity, bool isConditionallyMediated) 585public virtual async Task<string> MakePasskeyRequestOptionsAsync(TUser? user) 642public virtual async Task<string> MakeAllAcceptedCredentialsSignalOptionsAsync(TUser user) 688public virtual async Task<string> MakeCurrentUserDetailsSignalOptionsAsync(TUser user, PasskeyUserEntity userEntity) 721public virtual async Task<string?> MakeUnknownCredentialSignalOptionsAsync(string credentialJson) 742public virtual async Task<PasskeyAttestationResult> PerformPasskeyAttestationAsync([StringSyntax(StringSyntaxAttribute.Json)] string credentialJson) 786public virtual async Task<PasskeyAssertionResult<TUser>> PerformPasskeyAssertionAsync([StringSyntax(StringSyntaxAttribute.Json)] string credentialJson) 829public virtual async Task<SignInResult> PasskeySignInAsync([StringSyntax(StringSyntaxAttribute.Json)] string credentialJson) 846private async Task<SignInResult> PasskeySignInCoreAsync(string credentialJson) 907private async Task<PasskeyAuthenticationInfo?> RetrievePasskeyAuthenticationInfoAsync() 911async Task<PasskeyAuthenticationInfo?> RetrievePasskeyInfoCoreAsync() 944public virtual async Task<bool> IsTwoFactorClientRememberedAsync(TUser user) 1002public virtual async Task<SignInResult> TwoFactorRecoveryCodeSignInAsync(string recoveryCode) 1019private async Task<SignInResult> TwoFactorRecoveryCodeSignInCoreAsync(string recoveryCode) 1037private async Task<SignInResult> DoTwoFactorSignInAsync(TUser user, TwoFactorAuthenticationInfo twoFactorInfo, bool isPersistent, bool rememberClient) 1084public virtual async Task<SignInResult> TwoFactorAuthenticatorSignInAsync(string code, bool isPersistent, bool rememberClient) 1101private async Task<SignInResult> TwoFactorAuthenticatorSignInCoreAsync(string code, bool isPersistent, bool rememberClient) 1149public virtual async Task<SignInResult> TwoFactorSignInAsync(string provider, string code, bool isPersistent, bool rememberClient) 1166private async Task<SignInResult> TwoFactorSignInCoreAsync(string provider, string code, bool isPersistent, bool rememberClient) 1208public virtual async Task<TUser?> GetTwoFactorAuthenticationUserAsync() 1227public virtual Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent) 1239public virtual async Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 1256private async Task<SignInResult> ExternalLoginSignInCoreAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 1276public virtual async Task<IEnumerable<AuthenticationScheme>> GetExternalAuthenticationSchemesAsync() 1288public virtual async Task<ExternalLoginInfo?> GetExternalLoginInfoAsync(string? expectedXsrf = null) 1326public virtual async Task<IdentityResult> UpdateExternalAuthenticationTokensAsync(ExternalLoginInfo externalLogin) 1375internal async Task<ClaimsPrincipal> StoreTwoFactorInfo(TUser user, string? loginProvider) 1392internal async Task<ClaimsPrincipal> StoreRememberClient(TUser user) 1412public virtual async Task<bool> IsTwoFactorEnabledAsync(TUser user) 1426protected virtual async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, bool isPersistent, string? loginProvider = null, bool bypassTwoFactor = false) 1465private async Task<TwoFactorAuthenticationInfo?> RetrieveTwoFactorInfoAsync() 1498protected virtual async Task<bool> IsLockedOut(TUser user) 1508protected virtual Task<SignInResult> LockedOut(TUser user) 1519protected virtual async Task<SignInResult?> PreSignInCheck(TUser user) 1551private async Task<IdentityResult> ResetLockoutWithResult(TUser user) 1568if (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(
parent\parent\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( 691private async Task<OpenApiRequestBody?> GetRequestBodyAsync(OpenApiDocument document, ApiDescription description, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, CancellationToken cancellationToken) 709private async Task<OpenApiRequestBody> GetFormRequestBody( 894private async Task<OpenApiRequestBody> GetJsonRequestBody( 982public 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() 262internal async Task<bool> TryServeCachedResponseAsync(OutputCacheContext context, OutputCacheEntry? cacheEntry, IReadOnlyList<IOutputCachePolicy> policies) 332internal 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.DirectTls (6)
Connection\DirectTlsConnection.FeatureCollection.cs (1)
41public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken)
TlsEventPump.cs (3)
72private Task<bool>? _stopTask; 1337public Task<bool> StopAndJoinAsync(CancellationToken cancellationToken) 1348private async Task<bool> StopAndJoinCoreAsync(CancellationToken cancellationToken)
TlsEventPumpPool.cs (2)
104public async Task<bool> StopAndConfirmExitAsync(CancellationToken cancellationToken) 113var stops = new Task<bool>[_pumps.Length];
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 (115)
HubConnection.cs (18)
385public virtual IDisposable On(string methodName, Type[] parameterTypes, Func<object?[], object, Task<object?>> handler, object state) 458/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 459/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 464public virtual async Task<ChannelReader<object?>> StreamAsChannelCoreAsync(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken = default) 480/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 481/// The <see cref="Task{TResult}.Result"/> property returns an <see cref="object"/> for the hub method return value. 486public virtual async Task<object?> InvokeCoreAsync(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken = default) 601public async Task<TimeSpan?> RefreshAuthenticationAsync(CancellationToken cancellationToken = default) 614private async Task<TimeSpan?> RefreshAuthenticationAsyncCore(ConnectionState connectionState, CancellationToken cancellationToken) 987private async Task<ChannelReader<object?>> StreamAsChannelCoreAsyncCore(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken) 1282private async Task<(ConnectionState, Activity?)> WaitForActiveConnectionWithActivityAsync(string sendingMethodName, string invokedMethodName, CancellationToken token) 1291var connectionStateTask = _state.WaitForActiveConnectionAsync(sendingMethodName, token); 1340private async Task<object?> InvokeCoreAsyncCore(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken) 1348Task<object?> invocationTask; 1595private async Task<CloseMessage?> ProcessMessagesAsync(HubMessage message, ConnectionState connectionState, ChannelWriter<InvocationMessage> invocationMessageWriter) 1717if (handler.HasResult && task is Task<object?> resultTask) 2394public bool HasResult => _callback.Method.ReturnType == typeof(Task<object>); 2810public 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 (41)
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)
607internal async Task<bool> HandshakeAsync(TimeSpan timeout, IReadOnlyList<string>? supportedProtocols, IHubProtocolResolver protocolResolver,
HubConnectionHandler.cs (3)
153Func<AuthenticationRefreshContext, Task<bool>>? previousOnAuthenticationRefresh = null; 154Func<AuthenticationRefreshContext, Task<bool>>? authenticationRefreshCallback = null; 197private Task<bool> OnAuthenticationRefreshAsync(HubConnectionContext connection, AuthenticationRefreshContext context)
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, 757private static Task<bool> IsHubMethodAuthorized( 777private static async Task<bool> IsHubMethodAuthorizedSlow(IServiceProvider provider, ClaimsPrincipal principal, IReadOnlyList<object> authorizationMetadata, HubInvocationContext resource) 794private 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,
parent\parent\parent\common\testassets\Tests.Utils\TaskExtensions.cs (2)
28public static async Task<T> OrThrowIfOtherFails<T>(this Task<T> task, Task otherTask)
parent\parent\parent\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)
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,
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( 893if (!_projectCachePlugins.TryGetValue(projectCacheDescriptor, out Lazy<Task<ProjectCachePlugin>>? pluginLazyTask)) 971foreach (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)
1006public async Task<BuildEngineResult> InternalBuildProjects(string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IList<String>[] undefineProperties, string[] toolsVersion, bool returnTargetOutputs, bool skipNonexistentTargets = false) 1179private 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)
parent\Shared\NodeEndpointOutOfProcBase.cs (1)
686Task<int> readTask = localReadPipe.ReadAsync(headerByte.AsMemory(), CancellationToken.None).AsTask();
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)
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)
573var 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)
100internal static async Task<bool> RunServerShutdownRequestAsync( 178internal static Task<BuildResponse> RunServerBuildRequestAsync( 198internal static async Task<BuildResponse> RunServerBuildRequestAsync( 221static Task<NamedPipeClientStream?> tryConnectToServerAsync( 298static async Task<BuildResponse> tryRunRequestAsync( 321var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 392internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
Microsoft.Build.Tasks.Core (10)
AssemblyDependency\Node\OutOfProcRarNode.cs (1)
73private async Task<RarNodeShutdownReason> RunNodeAsync(CancellationToken cancellationToken)
DownloadFile.cs (1)
90private async Task<bool> ExecuteAsync()
parent\Shared\NodePipeBase.cs (1)
156internal async Task<INodePacket> ReadPacketAsync(CancellationToken cancellationToken = default)
parent\Shared\NodePipeServer.cs (1)
81internal async Task<LinkStatus> WaitForConnectionAsync(CancellationToken cancellationToken)
TarDirectory.cs (2)
136/// <returns>A <see cref="System.Threading.Tasks.Task{Boolean}"/> that resolves to <see langword="true"/> when the archive was written without errors or cancellation.</returns> 137private async System.Threading.Tasks.Task<bool> ExecuteAsync()
Untar.cs (4)
116/// <returns>A <see cref="System.Threading.Tasks.Task{Boolean}"/> that resolves to <see langword="true"/> when extraction completed without errors or cancellation.</returns> 117private async System.Threading.Tasks.Task<bool> ExecuteAsync() 164/// A <see cref="System.Threading.Tasks.Task{Boolean}"/> that resolves to <see langword="false"/> when extraction was 167private async System.Threading.Tasks.Task<bool> TryExtractTarballAsync(FileInfo sourceFile, DirectoryInfo destinationDirectory)
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)
84private ConcurrentDictionary<string, Task<string>> CopyMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer); 344if (CopyMap.TryGetValue(originalFilePath, out var copyTask)) 351var task = CopyMap.GetOrAdd(originalFilePath, tcs.Task);
FileSystem\FileUtilities.cs (4)
337public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 342public 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)
612Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
596public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 607public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 618public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
Syntax\SyntaxReference.cs (1)
38public virtual Task<SyntaxNode> GetSyntaxAsync(CancellationToken cancellationToken = default)
Syntax\SyntaxTree.cs (3)
120public virtual Task<SourceText> GetTextAsync(CancellationToken cancellationToken = default) 154public Task<SyntaxNode> GetRootAsync(CancellationToken cancellationToken = default) 163protected abstract Task<SyntaxNode> GetRootAsyncCore(CancellationToken cancellationToken);
Microsoft.CodeAnalysis.Analyzers (211)
FixAnalyzers\FixerWithFixAllAnalyzer.Fixer.cs (1)
57private static async Task<Document> AddMethodAsync(Document document, SyntaxNode classDecl, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (7)
105private static Task<Solution> AddAnalyzerReleaseTrackingFilesAsync(Project project) 169private static async Task<Solution> AddEntryToUnshippedFileAsync(Project project, string entryToAdd, CancellationToken cancellationToken) 181private static Task<SourceText> AddEntriesToUnshippedFileAsync( 187private static async Task<Solution> UpdateEntryInUnshippedFileAsync(Project project, string ruleId, string entryToUpdate, CancellationToken cancellationToken) 199private static Task<SourceText> UpdateEntriesInUnshippedFileAsync( 205private static Task<SourceText> AddOrUpdateEntriesToUnshippedFileAsync( 249private static async Task<SourceText> AddOrUpdateEntriesToUnshippedFileAsync(
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.FixAllProvider.cs (5)
26public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 90protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 130private static async Task<SourceText> AddEntriesToUnshippedFileForDiagnosticsAsync(TextDocument unshippedDataDocument, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken) 144private static async Task<SourceText> UpdateEntriesInUnshippedFileForDiagnosticsAsync(TextDocument unshippedDataDocument, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken) 174protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
MetaAnalyzers\Fixers\ApplyDiagnosticAnalyzerAttributeFix.cs (1)
62private Task<Document> GetFixAsync(Document document, SyntaxNode root, SyntaxNode classDecl, SyntaxGenerator generator, params string[] languages)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (5)
65private async Task<Document> ConvertToEqualsAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 80private async Task<Document> CallOverloadWithEqualityComparerAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 116private static async Task<Document> CallOverloadWithEqualityComparerAsync(Document document, SyntaxNode nodeToReplace, IMethodSymbol? methodSymbol, 187private async Task<Document> EnsureEqualsCorrectAsync(Document document, SemanticModel semanticModel, IInvocationOperation invocationOperation, CancellationToken cancellationToken) 257private static async Task<Document> ConvertToEqualsAsync(Document document, SemanticModel semanticModel, IBinaryOperation binaryOperation, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\ConfigureGeneratedCodeAnalysisFix.cs (1)
43private async Task<Document> ConfigureGeneratedCodeAnalysisAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (1)
159private static async Task<Solution> ApplyFixAsync(Document document, SyntaxNode root, FixInfo fixInfo, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (2)
30public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 97protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
MetaAnalyzers\Fixers\EnableConcurrentExecutionFix.cs (1)
42private async Task<Document> EnableConcurrentExecutionAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\PreferIsKindFix.cs (2)
37private async Task<Document> ConvertKindToIsKindAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 63protected override async Task<Document?> FixAllAsync(FixAllContext fixAllContext, Document document, ImmutableArray<Diagnostic> diagnostics)
src\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)
337public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
612Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
596public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 607public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 618public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
98private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 228async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 260public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 262Task<(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 (1)
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)
337public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
612Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
596public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 607public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 618public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
98private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 228async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 260public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 262Task<(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.BuildClient.Package (9)
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)
100internal static async Task<bool> RunServerShutdownRequestAsync( 178internal static Task<BuildResponse> RunServerBuildRequestAsync( 198internal static async Task<BuildResponse> RunServerBuildRequestAsync( 221static Task<NamedPipeClientStream?> tryConnectToServerAsync( 298static async Task<BuildResponse> tryRunRequestAsync( 321var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 392internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
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)
337public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
612Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
596public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 607public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 618public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
98private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 228async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 260public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 262Task<(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 (225)
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 (1)
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 (277)
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\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 (4)
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\Runtime\CSharpPreferReadOnlySpanPropertiesOverReadOnlyArrayFields.Fixer.cs (1)
382private static async Task<(
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)
612Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
596public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 607public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 618public 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)
200public 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 (1290)
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();
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 (10)
29private static readonly ConditionalWeakTable<DiagnosticAnalyzer, Lazy<Task<ImmutableHashSet<string>?>>> s_analyzerToDeprioritizedDiagnosticIds = new(); 31private async Task<bool> IsDeprioritizedAnalyzerAsync( 44public async Task<bool> IsAnyDeprioritizedDiagnosticIdInProcessAsync( 64var createdLazy = new Lazy<Task<ImmutableHashSet<string>?>>( 74var createdComputationTask = GetLazyValueAsync(createdLazy, CancellationToken.None); 105async Task<ImmutableHashSet<string>?> ComputeDeprioritizedDiagnosticIdsAsync(DiagnosticAnalyzer analyzer) 137private static async Task<ImmutableHashSet<string>?> GetCachedDeprioritizedDiagnosticIdsAsync( 145private static Task<T> GetLazyValueAsync<T>(Lazy<Task<T>> lazy, CancellationToken cancellationToken) 148var task = lazy.Value;
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)
196private async Task<(ImmutableArray<CodeAction> actions, ImmutableArray<CodeAction> actionsAllOccurrences)?> GetActionsAsync(Document document, 259private static async Task<(bool shouldDisplay, bool containsClassExpression)> ShouldExpressionDisplayCodeActionAsync( 299private async Task<Solution> IntroduceParameterAsync(Document originalDocument, TExpressionSyntax expression, 332protected 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, 682private 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( 422protected 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 (3)
33public async Task<ImmutableArray<SyntaxNode>> GetPotentialTestMethodsAsync( 83public async Task<ImmutableArray<SyntaxNode>> GetSemanticTestMethodsAsync( 94private async Task<ImmutableArray<SyntaxNode>> GetPotentialTestNodesAsync(
Testing\ITestMethodFinder.cs (2)
19Task<ImmutableArray<SyntaxNode>> GetPotentialTestMethodsAsync(Document document, TextSpan textSpan, bool useSemanticDiscovery, CancellationToken cancellationToken); 29Task<ImmutableArray<SyntaxNode>> GetSemanticTestMethodsAsync(
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)
30internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
185public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 198public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 225public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 243public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 262static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 322internal 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)
30internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
29internal 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( 163internal 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)
337public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
612Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
596public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 607public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 618public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
98private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 228async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 260public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 262Task<(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 (3)
Syntax\VisualBasicSyntaxTree.ParsedSyntaxTree.vb (1)
105Public Overrides Function GetRootAsync(Optional cancellationToken As CancellationToken = Nothing) As Task(Of VisualBasicSyntaxNode)
Syntax\VisualBasicSyntaxTree.vb (2)
64Public Overridable Shadows Function GetRootAsync(Optional cancellationToken As CancellationToken = Nothing) As Task(Of VisualBasicSyntaxNode) 549Protected Overrides Async Function GetRootAsyncCore(cancellationToken As CancellationToken) As Task(Of SyntaxNode)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (24)
src\f388afcd21099bcf\VisualBasicInitializeParameterService.vb (1)
53Protected Overrides Function TryAddAssignmentForPrimaryConstructorAsync(document As Document, parameter As IParameterSymbol, fieldOrProperty As ISymbol, cancellationToken As CancellationToken) As Task(Of Solution)
src\f736901a33c2b55b\VisualBasicMoveDeclarationNearReferenceService.vb (1)
45Protected Overrides Function TypesAreCompatibleAsync(document As Document, localSymbol As ILocalSymbol, declarationStatement As LocalDeclarationStatementSyntax, right As SyntaxNode, cancellationToken As CancellationToken) As Task(Of Boolean)
src\f736901a33c2b55b\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
476Dim taskOfT = Me.Compilation.GetTypeByMetadataName(GetType(Task(Of)).FullName) 911If name.Equals(NameOf(Task(Of Integer).ConfigureAwait)) AndAlso 915ElseIf name.Equals(NameOf(Task(Of Integer).ContinueWith)) Then
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (3)
39Protected Overrides Async Function GetDescriptionAsync(diagnostic As Diagnostic, node As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Task(Of String) 44Protected Overrides Async Function GetRootInOtherSyntaxTreeAsync(node As SyntaxNode, semanticModel As SemanticModel, diagnostic As Diagnostic, cancellationToken As CancellationToken) As Task(Of (SyntaxTree As SyntaxTree, root As SyntaxNode)?) 57Private Shared Async Function GetMethodFromExpressionAsync(oldNode As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Task(Of Tuple(Of SyntaxNode, MethodBlockSyntax))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.vb (1)
32Protected Overrides Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.vb (1)
34Protected Overrides Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateConversionCodeFixProvider.vb (1)
34Protected Overrides Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateParameterizedMemberCodeFixProvider.vb (1)
53Protected Overrides Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateVariable\VisualBasicGenerateVariableCodeFixProvider.vb (1)
37Protected Overrides Async Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicChangeToYieldCodeFixProvider.vb (1)
40Protected Overrides Function GetCodeFixAsync(root As SyntaxNode, node As SyntaxNode, document As Document, diagnostics As Diagnostic, cancellationToken As CancellationToken) As Task(Of CodeAction)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (1)
42Protected Overrides Async Function GetCodeFixAsync(root As SyntaxNode, node As SyntaxNode, document As Document, diagnostics As Diagnostic, cancellationToken As CancellationToken) As Task(Of CodeAction)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (2)
94cancellationToken As CancellationToken) As Task(Of SyntaxNode) 116cancellationToken As CancellationToken) As Task(Of SyntaxNode)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\UseAutoProperty\VisualBasicUseAutoPropertyCodeFixProvider.vb (2)
61cancellationToken As CancellationToken) As Task(Of SyntaxNode) 100Private Shared Async Function GetFieldInitializerAsync(fieldSymbol As IFieldSymbol, cancellationToken As CancellationToken) As Task(Of (equalsValue As EqualsValueSyntax, asNewClause As AsNewClauseSyntax, arrayBounds As ArgumentListSyntax))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
47cancellationToken As CancellationToken) As Task(Of (SyntaxNode, SyntaxNode))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeFixesAndRefactorings\VisualBasicFixAllSpanMappingService.vb (1)
22Protected Overrides Function GetFixAllSpansIfWithinGlobalStatementAsync(document As Document, diagnosticSpan As TextSpan, cancellationToken As CancellationToken) As Task(Of ImmutableDictionary(Of Document, ImmutableArray(Of TextSpan)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
29cancellationToken As CancellationToken) As Task(Of Document)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
46Public Overrides Async Function GetSyntaxAsync(Optional cancellationToken As CancellationToken = Nothing) As Task(Of SyntaxNode)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxFactsService.vb (1)
38Public Function GetSelectedFieldsAndPropertiesAsync(tree As SyntaxTree, textSpan As TextSpan, allowPartialSelection As Boolean, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of SyntaxNode)) Implements ISyntaxFactsService.GetSelectedFieldsAndPropertiesAsync
Microsoft.CodeAnalysis.VisualBasic.Features (134)
AddImport\VisualBasicAddImportFeatureService.vb (3)
283cancellationToken As CancellationToken) As Task(Of Document) 295cancellationToken As CancellationToken) As Task(Of Document) 314cancellationToken As CancellationToken) As Task(Of Document)
BraceMatching\InterpolatedStringBraceMatcher.vb (1)
27) As Task(Of BraceMatchingResult?) Implements IBraceMatcher.FindBracesAsync
BraceMatching\StringLiteralBraceMatcher.vb (1)
24cancellationToken As CancellationToken) As Task(Of BraceMatchingResult?) Implements IBraceMatcher.FindBracesAsync
CallHierarchy\VisualBasicCallHierarchyService.vb (1)
20Protected Overrides Async Function GetOperationRootSyntaxAsync(syntaxReference As SyntaxReference, cancellationToken As CancellationToken) As Task(Of SyntaxNode)
ChangeSignature\VisualBasicChangeSignatureService.vb (2)
99cancellationToken As CancellationToken) As Task(Of (symbol As ISymbol, selectedIndex As Integer)) 685cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of ISymbol))
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.CodeAction.vb (1)
29Protected Overrides Async Function GetChangedDocumentAsync(cancellationToken As CancellationToken) As Task(Of Document)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (3)
167Private Shared Async Function GeneratePropertyEndConstructAsync(document As Document, node As PropertyBlockSyntax, cancellationToken As CancellationToken) As Task(Of Document) 213Private Shared Async Function GenerateEndConstructAsync(document As Document, endStatement As SyntaxNode, cancellationToken As CancellationToken) As Task(Of Document) 231Private Shared Async Function InsertEndConstructAsync(document As Document, endStatement As SyntaxNode, cancellationToken As CancellationToken) As Task(Of Document)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.CodeAction.vb (1)
35Protected Overrides Function GetChangedDocumentAsync(cancellationToken As CancellationToken) As Task(Of Document)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (4)
76Private Shared Async Function GenerateEventFromAddRemoveHandlerAsync(document As Document, handlerStatement As AddRemoveHandlerStatementSyntax, cancellationToken As CancellationToken) As Task(Of CodeAction) 125cancellationToken As CancellationToken) As Task(Of CodeAction) 241Private Shared Async Function GenerateEventFromImplementsAsync(document As Document, node As QualifiedNameSyntax, cancellationToken As CancellationToken) As Task(Of CodeAction) 314Private Shared Async Function GenerateEventFromHandlesAsync(document As Document, handlesClauseItem As HandlesClauseItemSyntax, cancellationToken As CancellationToken) As Task(Of CodeAction)
CodeFixes\GenerateType\GenerateTypeCodeFixProvider.vb (1)
42Protected Overrides Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.AddKeywordCodeAction.vb (1)
39Protected Overrides Async Function GetChangedDocumentAsync(cancellationToken As CancellationToken) As Task(Of Document)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceKeywordCodeAction.vb (1)
38Protected Overrides Async Function GetChangedDocumentAsync(cancellationToken As CancellationToken) As Task(Of Document)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceTokenKeywordCodeAction.vb (1)
32Protected Overrides Async Function GetChangedDocumentAsync(cancellationToken As CancellationToken) As Task(Of Document)
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (1)
79Private Shared Async Function GetCodeActionsAsync(document As Document, node As SyntaxNode, rewrittenNode As SyntaxNode, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of CodeAction))
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.MoveToLineCodeAction.vb (1)
32Protected Overrides Async Function GetChangedDocumentAsync(cancellationToken As CancellationToken) As Task(Of Document)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.AddKeywordAction.vb (2)
41Protected Overrides Async Function GetChangedDocumentAsync(cancellationToken As CancellationToken) As Task(Of Document) 51Private Async Function GetNewNodeAsync(document As Document, node As SyntaxNode, options As SyntaxFormattingOptions, cancellationToken As CancellationToken) As Task(Of SyntaxNode)
CodeLens\VisualBasicCodeLensMemberFinder.vb (1)
24Public Async Function GetCodeLensMembersAsync(document As Document, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeLensMember)) Implements ICodeLensMemberFinder.GetCodeLensMembersAsync
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (5)
120Private Shared Async Function InlineTemporaryAsync(document As Document, modifiedIdentifier As ModifiedIdentifierSyntax, cancellationToken As CancellationToken) As Task(Of Document) 224Private Shared Async Function FindDefinitionAsync(document As Document, cancellationToken As CancellationToken) As Task(Of ModifiedIdentifierSyntax) 234Private Shared Async Function FindReferenceAnnotatedNodesAsync(document As Document, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of IdentifierNameSyntax)) 366Private Shared Async Function CreateExpressionToInlineAsync(document As Document, cancellationToken As CancellationToken) As Task(Of ExpressionSyntax) 413) As Task(Of Document)
CodeRefactorings\MoveStaticMembers\VisualBasicMoveStaticMembersRefactoringProvider.vb (1)
22Protected Overrides Async Function GetSelectedNodesAsync(context As CodeRefactoringContext) As Task(Of ImmutableArray(Of SyntaxNode))
CodeRefactorings\MoveType\VisualBasicMoveTypeService.vb (1)
32Protected Overrides Async Function GetRelevantNodeAsync(document As Document, textSpan As TextSpan, cancellationToken As CancellationToken) As Task(Of TypeBlockSyntax)
CodeRefactorings\NodeSelectionHelpers.vb (1)
14Friend Async Function GetSelectedMemberDeclarationAsync(context As CodeRefactoringContext) As Task(Of ImmutableArray(Of SyntaxNode))
CodeRefactorings\RemoveStatementCodeAction.vb (1)
29Protected Overrides Async Function GetChangedDocumentAsync(cancellationToken As CancellationToken) As Task(Of Document)
CodeRefactorings\SyncNamespace\VisualBasicChangeNamespaceService.vb (2)
70Protected Overrides Function GetValidContainersFromAllLinkedDocumentsAsync(document As Document, container As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of (DocumentId, SyntaxNode))) 85Protected Overrides Function TryGetApplicableContainerFromSpanAsync(document As Document, span As TextSpan, cancellationToken As CancellationToken) As Task(Of SyntaxNode)
Completion\CompletionProviders\AwaitCompletionProvider.vb (1)
46Protected Overrides Function GetReturnTypeChangeAsync(solution As Solution, semanticModel As SemanticModel, declaration As SyntaxNode, cancellationToken As CancellationToken) As Task(Of TextChange?)
Completion\CompletionProviders\CompletionListTagCompletionProvider.vb (1)
34cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of SymbolAndSelectionInfo))
Completion\CompletionProviders\CrefCompletionProvider.vb (1)
100Protected Overrides Async Function GetSymbolsAsync(document As Document, position As Integer, options As CompletionOptions, cancellationToken As CancellationToken) As Task(Of (SyntaxToken, SemanticModel, ImmutableArray(Of ISymbol)))
Completion\CompletionProviders\EnumCompletionProvider.vb (1)
42cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of SymbolAndSelectionInfo))
Completion\CompletionProviders\HandlesClauseCompletionProvider.vb (2)
38cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of SymbolAndSelectionInfo)) 44Private Overloads Shared Function GetSymbolsAsync(context As VisualBasicSyntaxContext, position As Integer, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of ISymbol))
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (2)
50cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of SymbolAndSelectionInfo)) 57context As VisualBasicSyntaxContext, position As Integer, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of ISymbol))
Completion\CompletionProviders\ImportCompletionProvider\ExtensionMethodImportCompletionProvider.vb (1)
39Protected Overrides Function ShouldProvideParenthesisCompletionAsync(document As Document, item As CompletionItem, commitKey As Char?, cancellationToken As CancellationToken) As Task(Of Boolean)
Completion\CompletionProviders\ImportCompletionProvider\TypeImportCompletionProvider.vb (1)
43Protected Overrides Function ShouldProvideParenthesisCompletionAsync(document As Document, item As CompletionItem, commitKey As Char?, cancellationToken As CancellationToken) As Task(Of Boolean)
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (2)
110Friend Overrides Function GetDescriptionWorkerAsync(document As Document, item As CompletionItem, options As CompletionOptions, displayOptions As SymbolDescriptionOptions, cancellationToken As CancellationToken) As Task(Of CompletionDescription) 197Protected Overrides Function GetTextChangeAsync(selectedItem As CompletionItem, ch As Char?, cancellationToken As CancellationToken) As Task(Of TextChange?)
Completion\CompletionProviders\ObjectInitializerCompletionProvider.vb (1)
100Protected Overrides Function IsExclusiveAsync(document As Document, position As Integer, cancellationToken As CancellationToken) As Task(Of Boolean)
Completion\CompletionProviders\PartialTypeCompletionProvider.vb (1)
72Public Overrides Async Function GetTextChangeAsync(document As Document, selectedItem As CompletionItem, ch As Char?, cancellationToken As CancellationToken) As Task(Of TextChange?)
Completion\CompletionProviders\SymbolCompletionProvider.vb (2)
70Protected Overrides Function ShouldPreselectInferredTypesAsync(completionContext As CompletionContext, position As Integer, options As CompletionOptions, cancellationToken As CancellationToken) As Task(Of Boolean) 74Protected Overrides Function ShouldProvideAvailableSymbolsInCurrentContextAsync(completionContext As CompletionContext, syntaxContext As VisualBasicSyntaxContext, position As Integer, options As CompletionOptions, cancellationToken As CancellationToken) As Task(Of Boolean)
Completion\CompletionProviders\VisualBasicSuggestionModeCompletionProvider.vb (1)
33Protected Overrides Async Function GetSuggestionModeItemAsync(document As Document, position As Integer, itemSpan As TextSpan, trigger As CompletionTrigger, cancellationToken As CancellationToken) As Task(Of CompletionItem)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (1)
69Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, trigger As CompletionTrigger, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of CompletionItem))
ConvertAutoPropertyToFullProperty\VisualBasicConvertAutoPropertyToFullProperty.vb (2)
30Protected Overrides Function GetFieldNameAsync(document As Document, propertySymbol As IPropertySymbol, cancellationToken As CancellationToken) As Task(Of String) 89Protected Overrides Function ExpandToFieldPropertyAsync(document As Document, [property] As PropertyStatementSyntax, cancellationToken As CancellationToken) As Task(Of Document)
Debugging\DataTipInfoGetter.vb (1)
23cancellationToken As CancellationToken) As Task(Of DebugDataTipInfo)
Debugging\LocationInfoGetter.vb (1)
14Friend Async Function GetInfoAsync(document As Document, position As Integer, cancellationToken As CancellationToken) As Task(Of DebugLocationInfo)
Debugging\ProximityExpressionsGetter.vb (2)
27cancellationToken As CancellationToken) As Task(Of IList(Of String)) Implements IProximityExpressionsService.GetProximityExpressionsAsync 59cancellationToken As CancellationToken) As Task(Of Boolean) Implements IProximityExpressionsService.IsValidAsync
Debugging\VisualBasicBreakpointService.vb (3)
26Friend Shared Async Function GetBreakpointAsync(document As Document, position As Integer, length As Integer, cancellationToken As CancellationToken) As Task(Of BreakpointResolutionResult) 76Public Function ResolveBreakpointAsync(document As Document, textSpan As TextSpan, Optional cancellationToken As CancellationToken = Nothing) As Task(Of BreakpointResolutionResult) Implements IBreakpointResolutionService.ResolveBreakpointAsync 83Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of BreakpointResolutionResult)) Implements IBreakpointResolutionService.ResolveBreakpointsAsync
Debugging\VisualBasicLanguageDebugInfoService.vb (2)
21Public Function GetLocationInfoAsync(document As Document, position As Integer, cancellationToken As CancellationToken) As Task(Of DebugLocationInfo) Implements ILanguageDebugInfoService.GetLocationInfoAsync 25Public Function GetDataTipInfoAsync(document As Document, position As Integer, includeKind As Boolean, cancellationToken As CancellationToken) As Task(Of DebugDataTipInfo) Implements ILanguageDebugInfoService.GetDataTipInfoAsync
EncapsulateField\VisualBasicEncapsulateFieldService.vb (2)
30cancellationToken As CancellationToken) As Task(Of SyntaxNode) 71Protected Overrides Async Function GetFieldsAsync(document As Document, span As TextSpan, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of IFieldSymbol))
ExtractInterface\VisualBasicExtractInterfaceService.vb (2)
28cancellationToken As CancellationToken) As Task(Of SyntaxNode) 103symbolToDeclarationAnnotationMap As ImmutableDictionary(Of ISymbol, SyntaxAnnotation), cancellationToken As CancellationToken) As Task(Of Solution)
ExtractMethod\VisualBasicMethodExtractor.vb (2)
49Protected Overrides Async Function PreserveTriviaAsync(root As SyntaxNode, cancellationToken As CancellationToken) As Task(Of TriviaResult) 116cancellationToken As CancellationToken) As Task(Of (document As Document, invocationNameToken As SyntaxToken))
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.ExpressionCodeGenerator.vb (1)
97Protected Overrides Async Function GetStatementOrInitializerContainingInvocationToExtractedMethodAsync(cancellationToken As CancellationToken) As Task(Of StatementSyntax)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.MultipleStatementsCodeGenerator.vb (1)
60Protected Overrides Function GetStatementOrInitializerContainingInvocationToExtractedMethodAsync(cancellationToken As CancellationToken) As Task(Of StatementSyntax)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.SingleStatementCodeGenerator.vb (1)
50Protected Overrides Function GetStatementOrInitializerContainingInvocationToExtractedMethodAsync(cancellationToken As CancellationToken) As Task(Of StatementSyntax)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (4)
68Protected Overrides Function UpdateMethodAfterGenerationAsync(originalDocument As SemanticDocument, methodSymbol As IMethodSymbol, cancellationToken As CancellationToken) As Task(Of SemanticDocument) 98cancellationToken As CancellationToken) As Task(Of SyntaxNode) 119insertionPointNode As SyntaxNode, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of StatementSyntax)) 428Protected Overrides Async Function PerformFinalTriviaFixupAsync(newDocument As SemanticDocument, cancellationToken As CancellationToken) As Task(Of SemanticDocument)
ExtractMethod\VisualBasicSelectionResult.vb (1)
24cancellationToken As CancellationToken) As Task(Of VisualBasicSelectionResult)
ExtractMethod\VisualBasicSelectionValidator.vb (1)
84cancellationToken As CancellationToken) As Task(Of SelectionResult)
Formatting\VisualBasicOrganizeUsingsNewDocumentFormattingProvider.vb (1)
22Public Async Function FormatNewDocumentAsync(document As Document, hintDocument As Document, options As CodeCleanupOptions, cancellationToken As CancellationToken) As Task(Of Document) Implements INewDocumentFormattingProvider.FormatNewDocumentAsync
FullyQualify\VisualBasicFullyQualifyService.vb (1)
60Protected Overrides Async Function ReplaceNodeAsync(simpleName As SimpleNameSyntax, containerName As String, resultingSymbolIsType As Boolean, cancellationToken As CancellationToken) As Task(Of SyntaxNode)
GenerateType\VisualBasicGenerateTypeService.vb (2)
419Public Overrides Async Function GetOrGenerateEnclosingNamespaceSymbolAsync(namedTypeSymbol As INamedTypeSymbol, containers() As String, selectedDocument As Document, selectedDocumentRoot As SyntaxNode, cancellationToken As CancellationToken) As Task(Of (INamespaceSymbol, INamespaceOrTypeSymbol, Location)) 617cancellationToken As CancellationToken) As Task(Of Solution)
GoToDefinition\VisualBasicGoToDefinitionSymbolService.vb (1)
24Protected Overrides Async Function FindRelatedExplicitlyDeclaredSymbolAsync(project As Project, symbol As ISymbol, cancellationToken As CancellationToken) As Task(Of ISymbol)
IntroduceVariable\VisualBasicIntroduceLocalForExpressionCodeRefactoringProvider.vb (1)
49Protected Overrides Function CreateTupleDeconstructionAsync(document As Document, tupleType As INamedTypeSymbol, expression As ExpressionSyntax, cancellationToken As CancellationToken) As Task(Of ExpressionStatementSyntax)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceField.vb (2)
20cancellationToken As CancellationToken) As Task(Of Document) 64cancellationToken As CancellationToken) As Task(Of Document)
LanguageServices\VisualBasicSymbolDisplayService.SymbolDescriptionBuilder.vb (7)
76Protected Overrides Function GetInitializerSourcePartsAsync(symbol As ISymbol) As Task(Of ImmutableArray(Of SymbolDisplayPart)) 96Private Async Function GetFirstDeclarationAsync(Of T As SyntaxNode)(symbol As ISymbol) As Task(Of T) 108Private Async Function GetDeclarationsAsync(Of T As SyntaxNode)(symbol As ISymbol) As Task(Of List(Of T)) 121Private Overloads Async Function GetInitializerSourcePartsAsync(symbol As IParameterSymbol) As Task(Of ImmutableArray(Of SymbolDisplayPart)) 130Private Overloads Async Function GetInitializerSourcePartsAsync(symbol As ILocalSymbol) As Task(Of ImmutableArray(Of SymbolDisplayPart)) 140Private Overloads Async Function GetInitializerSourcePartsAsync(symbol As IFieldSymbol) As Task(Of ImmutableArray(Of SymbolDisplayPart)) 155Private Overloads Async Function GetInitializerSourcePartsAsync(equalsValue As EqualsValueSyntax) As Task(Of ImmutableArray(Of SymbolDisplayPart))
LineSeparators\VisualBasicLineSeparatorService.vb (1)
57cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of TextSpan)) Implements ILineSeparatorService.GetLineSeparatorsAsync
MetadataAsSource\VisualBasicMetadataAsSourceService.vb (3)
27Protected Overrides Async Function AddAssemblyInfoRegionAsync(document As Document, symbolCompilation As Compilation, symbol As ISymbol, cancellationToken As CancellationToken) As Task(Of Document) 53Protected Overrides Function AddNullableRegionsAsync(document As Document, cancellationToken As CancellationToken) As Task(Of Document) 58Protected Overrides Async Function ConvertDocCommentsToRegularCommentsAsync(document As Document, docCommentFormattingService As IDocumentationCommentFormattingService, cancellationToken As CancellationToken) As Task(Of Document)
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
41cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of RoslynNavigationBarItem))
Organizing\VisualBasicOrganizerService.vb (1)
22Protected Overrides Async Function ProcessAsync(document As Document, organizers As IEnumerable(Of ISyntaxOrganizer), cancellationToken As CancellationToken) As Task(Of Document)
QuickInfo\VisualBasicSemanticQuickInfoProvider.vb (3)
29token As SyntaxToken) As Task(Of QuickInfoItem) 45cancellationToken As CancellationToken) As Task(Of QuickInfoItem) 158cancellationToken As CancellationToken) As Task(Of QuickInfoItem)
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (1)
215Private Function IReplaceMethodWithPropertyService_GetMethodDeclarationAsync(context As CodeRefactoringContext) As Task(Of SyntaxNode) Implements IReplaceMethodWithPropertyService.GetMethodDeclarationAsync
ReplacePropertyWithMethods\VisualBasicReplacePropertyWithMethods.vb (1)
33cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of SyntaxNode))
SignatureHelp\AbstractIntrinsicOperatorSignatureHelpProvider.vb (1)
32Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, triggerInfo As SignatureHelpTriggerInfo, options As MemberDisplayOptions, cancellationToken As CancellationToken) As Task(Of SignatureHelpItems)
SignatureHelp\AttributeSignatureHelpProvider.vb (1)
51Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, triggerInfo As SignatureHelpTriggerInfo, options As MemberDisplayOptions, cancellationToken As CancellationToken) As Task(Of SignatureHelpItems)
SignatureHelp\CollectionInitializerSignatureHelpProvider.vb (1)
45Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, triggerInfo As SignatureHelpTriggerInfo, options As MemberDisplayOptions, cancellationToken As CancellationToken) As Task(Of SignatureHelpItems)
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (1)
54Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, triggerInfo As SignatureHelpTriggerInfo, options As MemberDisplayOptions, cancellationToken As CancellationToken) As Task(Of SignatureHelpItems)
SignatureHelp\GenericNameSignatureHelpProvider.vb (1)
60Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, triggerInfo As SignatureHelpTriggerInfo, options As MemberDisplayOptions, cancellationToken As CancellationToken) As Task(Of SignatureHelpItems)
SignatureHelp\InvocationExpressionSignatureHelpProvider.vb (1)
62Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, triggerInfo As SignatureHelpTriggerInfo, options As MemberDisplayOptions, cancellationToken As CancellationToken) As Task(Of SignatureHelpItems)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.vb (1)
61Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, triggerInfo As SignatureHelpTriggerInfo, options As MemberDisplayOptions, cancellationToken As CancellationToken) As Task(Of SignatureHelpItems)
SignatureHelp\PredefinedCastExpressionSignatureHelpProvider.vb (1)
28Private Shared Async Function GetIntrinsicOperatorDocumentationImplAsync(node As PredefinedCastExpressionSyntax, document As Document, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of AbstractIntrinsicOperatorDocumentation))
SignatureHelp\RaiseEventStatementSignatureHelpProvider.vb (1)
66) As Task(Of SignatureHelpItems)
Snippets\VisualBasicSnippetFunctionService.vb (3)
22Public Overrides Async Function GetContainingClassNameAsync(document As Document, position As Integer, cancellationToken As CancellationToken) As Task(Of String) 29Protected Overrides Async Function GetEnumSymbolAsync(document As Document, switchExpressionSpan As TextSpan, cancellationToken As CancellationToken) As Task(Of ITypeSymbol) 44Protected Overrides Async Function GetDocumentWithEnumCaseAsync(document As Document, fullyQualifiedTypeName As String, firstEnumMemberName As String, caseGenerationLocation As TextSpan, cancellationToken As CancellationToken) As Task(Of (Document, TextSpan))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (3)
39Protected Overrides Async Function GetDescriptionAsync(diagnostic As Diagnostic, node As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Task(Of String) 44Protected Overrides Async Function GetRootInOtherSyntaxTreeAsync(node As SyntaxNode, semanticModel As SemanticModel, diagnostic As Diagnostic, cancellationToken As CancellationToken) As Task(Of (SyntaxTree As SyntaxTree, root As SyntaxNode)?) 57Private Shared Async Function GetMethodFromExpressionAsync(oldNode As SyntaxNode, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Task(Of Tuple(Of SyntaxNode, MethodBlockSyntax))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.vb (1)
32Protected Overrides Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.vb (1)
34Protected Overrides Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateConversionCodeFixProvider.vb (1)
34Protected Overrides Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateParameterizedMemberCodeFixProvider.vb (1)
53Protected Overrides Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateVariable\VisualBasicGenerateVariableCodeFixProvider.vb (1)
37Protected Overrides Async Function GetCodeActionsAsync(document As Document, node As SyntaxNode, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of CodeAction))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicChangeToYieldCodeFixProvider.vb (1)
40Protected Overrides Function GetCodeFixAsync(root As SyntaxNode, node As SyntaxNode, document As Document, diagnostics As Diagnostic, cancellationToken As CancellationToken) As Task(Of CodeAction)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (1)
42Protected Overrides Async Function GetCodeFixAsync(root As SyntaxNode, node As SyntaxNode, document As Document, diagnostics As Diagnostic, cancellationToken As CancellationToken) As Task(Of CodeAction)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (2)
94cancellationToken As CancellationToken) As Task(Of SyntaxNode) 116cancellationToken As CancellationToken) As Task(Of SyntaxNode)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\UseAutoProperty\VisualBasicUseAutoPropertyCodeFixProvider.vb (2)
61cancellationToken As CancellationToken) As Task(Of SyntaxNode) 100Private Shared Async Function GetFieldInitializerAsync(fieldSymbol As IFieldSymbol, cancellationToken As CancellationToken) As Task(Of (equalsValue As EqualsValueSyntax, asNewClause As AsNewClauseSyntax, arrayBounds As ArgumentListSyntax))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
47cancellationToken As CancellationToken) As Task(Of (SyntaxNode, SyntaxNode))
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Usage\BasicPreferGenericOverloads.Fixer.vb (1)
26cancellationToken As CancellationToken) As Task(Of Document)
Microsoft.CodeAnalysis.VisualBasic.Scripting (4)
VisualBasicScript.vb (4)
45Optional cancellationToken As CancellationToken = Nothing) As Task(Of ScriptState(Of T)) 55Optional cancellationToken As CancellationToken = Nothing) As Task(Of ScriptState(Of Object)) 65Optional cancellationToken As CancellationToken = Nothing) As Task(Of T) 75Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (31)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (1)
96Dim taskOfT = semanticModel.Compilation.GetTypeByMetadataName(GetType(Task(Of)).FullName)
CodeCleanup\Providers\AbstractTokensCodeCleanupProvider.vb (3)
20document As Document, root As SyntaxNode, spans As ImmutableArray(Of TextSpan), cancellationToken As CancellationToken) As Task(Of Rewriter) 22Public Async Function CleanupAsync(document As Document, spans As ImmutableArray(Of TextSpan), options As CodeCleanupOptions, cancellationToken As CancellationToken) As Task(Of Document) Implements ICodeCleanupProvider.CleanupAsync 30Public Async Function CleanupAsync(root As SyntaxNode, spans As ImmutableArray(Of TextSpan), options As SyntaxFormattingOptions, services As SolutionServices, cancellationToken As CancellationToken) As Task(Of SyntaxNode) Implements ICodeCleanupProvider.CleanupAsync
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (2)
30Protected Overrides Async Function GetRewriterAsync(document As Document, root As SyntaxNode, spans As ImmutableArray(Of TextSpan), cancellationToken As CancellationToken) As Task(Of Rewriter) 45Public Shared Async Function CreateAsync(document As Document, spans As ImmutableArray(Of TextSpan), cancellationToken As CancellationToken) As Task(Of AddMissingTokensRewriter)
CodeCleanup\Providers\CaseCorrectionCodeCleanupProvider.vb (2)
31Public Function CleanupAsync(document As Document, spans As ImmutableArray(Of TextSpan), options As CodeCleanupOptions, cancellationToken As CancellationToken) As Task(Of Document) Implements ICodeCleanupProvider.CleanupAsync 35Public Function CleanupAsync(root As SyntaxNode, spans As ImmutableArray(Of TextSpan), options As SyntaxFormattingOptions, services As SolutionServices, cancellationToken As CancellationToken) As Task(Of SyntaxNode) Implements ICodeCleanupProvider.CleanupAsync
CodeCleanup\Providers\FixIncorrectTokensCodeCleanupProvider.vb (2)
39Protected Overrides Function GetRewriterAsync(document As Document, root As SyntaxNode, spans As ImmutableArray(Of TextSpan), cancellationToken As CancellationToken) As Task(Of Rewriter) 56Public Shared Async Function CreateAsync(document As Document, spans As ImmutableArray(Of TextSpan), cancellationToken As CancellationToken) As Task(Of Rewriter)
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (2)
35Public Async Function CleanupAsync(document As Document, spans As ImmutableArray(Of TextSpan), options As CodeCleanupOptions, cancellationToken As CancellationToken) As Task(Of Document) Implements ICodeCleanupProvider.CleanupAsync 42Public Function CleanupAsync(root As SyntaxNode, spans As ImmutableArray(Of TextSpan), options As SyntaxFormattingOptions, services As SolutionServices, cancellationToken As CancellationToken) As Task(Of SyntaxNode) Implements ICodeCleanupProvider.CleanupAsync
CodeCleanup\Providers\ReduceTokensCodeCleanupProvider.vb (1)
33Protected Overrides Function GetRewriterAsync(document As Document, root As SyntaxNode, spans As ImmutableArray(Of TextSpan), cancellationToken As CancellationToken) As Task(Of Rewriter)
CodeCleanup\Providers\RemoveUnnecessaryLineContinuationCodeCleanupProvider.vb (2)
32Public Async Function CleanupAsync(document As Document, spans As ImmutableArray(Of TextSpan), options As CodeCleanupOptions, cancellationToken As CancellationToken) As Task(Of Document) Implements ICodeCleanupProvider.CleanupAsync 45Public Function CleanupAsync(root As SyntaxNode, spans As ImmutableArray(Of TextSpan), options As SyntaxFormattingOptions, services As SolutionServices, cancellationToken As CancellationToken) As Task(Of SyntaxNode) Implements ICodeCleanupProvider.CleanupAsync
FindSymbols\VisualBasicReferenceFinder.vb (3)
25cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of ISymbol)) Implements ILanguageServiceReferenceFinder.DetermineCascadedSymbolsAsync 38cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of ISymbol)) 51cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of ISymbol))
OrganizeImports\VisualBasicOrganizeImportsService.vb (1)
20Public Async Function OrganizeImportsAsync(document As Document, options As OrganizeImportsOptions, cancellationToken As CancellationToken) As Task(Of Document) Implements IOrganizeImportsService.OrganizeImportsAsync
Rename\VisualBasicRenameRewriterLanguageService.vb (2)
690cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Location)) 810cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of Location))
src\f388afcd21099bcf\VisualBasicInitializeParameterService.vb (1)
53Protected Overrides Function TryAddAssignmentForPrimaryConstructorAsync(document As Document, parameter As IParameterSymbol, fieldOrProperty As ISymbol, cancellationToken As CancellationToken) As Task(Of Solution)
src\f736901a33c2b55b\VisualBasicMoveDeclarationNearReferenceService.vb (1)
45Protected Overrides Function TypesAreCompatibleAsync(document As Document, localSymbol As ILocalSymbol, declarationStatement As LocalDeclarationStatementSyntax, right As SyntaxNode, cancellationToken As CancellationToken) As Task(Of Boolean)
src\f736901a33c2b55b\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
476Dim taskOfT = Me.Compilation.GetTypeByMetadataName(GetType(Task(Of)).FullName) 911If name.Equals(NameOf(Task(Of Integer).ConfigureAwait)) AndAlso 915ElseIf name.Equals(NameOf(Task(Of Integer).ContinueWith)) Then
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
349Public Function GetInterceptorSymbolAsync(document As Document, position As Integer, cancellationToken As CancellationToken) As Task(Of ISymbol) Implements ISemanticFacts.GetInterceptorSymbolAsync
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeFixesAndRefactorings\VisualBasicFixAllSpanMappingService.vb (1)
22Protected Overrides Function GetFixAllSpansIfWithinGlobalStatementAsync(document As Document, diagnosticSpan As TextSpan, cancellationToken As CancellationToken) As Task(Of ImmutableDictionary(Of Document, ImmutableArray(Of TextSpan)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
29cancellationToken As CancellationToken) As Task(Of Document)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
46Public Overrides Async Function GetSyntaxAsync(Optional cancellationToken As CancellationToken = Nothing) As Task(Of SyntaxNode)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxFactsService.vb (1)
38Public Function GetSelectedFieldsAndPropertiesAsync(tree As SyntaxTree, textSpan As TextSpan, allowPartialSelection As Boolean, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of SyntaxNode)) Implements ISyntaxFactsService.GetSelectedFieldsAndPropertiesAsync
Microsoft.CodeAnalysis.Workspaces (864)
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)
47private static readonly Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>> s_cleanupSyntaxPass = 50private static readonly ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> s_cleanupSyntaxPasses = [s_cleanupSyntaxPass]; 56private static readonly ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> s_allCleanupPasses = 74internal static Task<Document> CleanupSyntaxAsync(Document document, CodeCleanupOptions options, CancellationToken cancellationToken) 91internal static async Task<Solution> PostProcessChangesAsync( 113private static async Task<Solution> CleanSyntaxAndSemanticsAsync( 117ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> passes, 129async Task<ImmutableArray<(DocumentId documentId, CodeCleanupOptions codeCleanupOptions)>> GetDocumentIdsAndOptionsToCleanAsync() 189private static async Task<Solution> RunCleanupPassesInOrderAsync( 193ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> passes, 205async Task<Solution> RunParallelCleanupPassAsync( 206Solution 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( 494private async Task<bool> CheckForConflictAsync( 662private async Task<ISymbol> GetRenamedSymbolInCurrentSolutionAsync(MutableConflictResolution conflictResolution) 687private async Task<(ImmutableHashSet<DocumentId> documentIds, ImmutableArray<string> possibleNameConflicts)> FindDocumentsAndPossibleNameConflictsAsync() 762private 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)
84private ConcurrentDictionary<string, Task<string>> CopyMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer); 344if (CopyMap.TryGetValue(originalFilePath, out var copyTask)) 351var task = CopyMap.GetOrAdd(originalFilePath, tcs.Task);
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
337public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
612Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
596public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 607public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 618public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
98private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 228async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 260public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 262Task<(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 (1)
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)
246var isFullyLoadedTask = workspaceStatusService.IsFullyLoadedAsync(CancellationToken.None);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
105public 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)
582protected 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)
337public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 342public 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)
120private async Tasks.Task<bool> DownloadFromUriAsync(string uri, AbsolutePath destinationPath) 191private async Tasks.Task<bool> DownloadWithRetriesAsync(HttpClient httpClient, string uri, AbsolutePath destinationPath)
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( 109var processTask = processRunner.RunAsync(processSpec, clientLogger, launchResult, processTerminationSource.Token); 323var 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() 141private Task<ImmutableArray<string>> GetCapabilitiesTask() 164public override Task<ImmutableArray<string>> GetUpdateCapabilitiesAsync(CancellationToken cancellationToken) 197public async override Task<Task<bool>> ApplyManagedCodeUpdatesAsync(ImmutableArray<HotReloadManagedCodeUpdate> updates, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken) 217var updateCompletionTask = QueueUpdateBatchRequest(request, applyOperationCancellationToken); 221async Task<bool> CompleteApplyOperationAsync() 243public override async Task<Task<bool>> ApplyStaticAssetUpdatesAsync(ImmutableArray<HotReloadStaticAssetUpdate> updates, CancellationToken processExitedCancellationToken, CancellationToken cancellationToken) 271async Task<bool> CompleteApplyOperationAsync() 278private Task<bool> QueueUpdateBatchRequest<TRequest>(TRequest request, CancellationToken applyOperationCancellationToken)
src\sdk\src\Dotnet.Watch\HotReloadClient\HotReloadClient.cs (7)
70public abstract Task<ImmutableArray<string>> GetUpdateCapabilitiesAsync(CancellationToken cancellationToken); 77public abstract Task<Task<bool>> ApplyManagedCodeUpdatesAsync(ImmutableArray<HotReloadManagedCodeUpdate> updates, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken); 84public abstract Task<Task<bool>> ApplyStaticAssetUpdatesAsync(ImmutableArray<HotReloadStaticAssetUpdate> updates, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken); 112protected async Task<IReadOnlyList<HotReloadManagedCodeUpdate>> FilterApplicableUpdatesAsync(ImmutableArray<HotReloadManagedCodeUpdate> updates, CancellationToken cancellationToken) 142protected Task<bool> QueueUpdateBatch(Func<int, ValueTask<bool>> sendAndReceive, CancellationToken applyOperationCancellationToken)
src\sdk\src\Dotnet.Watch\HotReloadClient\HotReloadClients.cs (2)
140public async Task<Task> ApplyManagedCodeUpdatesAsync(ImmutableArray<ImmutableArray<HotReloadManagedCodeUpdate>> updates, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken) 184public 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 (66)
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 (3)
277public override async Task<ChatResponse> GetResponseAsync( 1162private async Task<(bool ShouldTerminate, int NewConsecutiveErrorCount, IList<ChatMessage> MessagesAdded)> ProcessFunctionCallsAsync( 1810private async Task<(IList<ChatMessage>? FunctionResultContentMessages, bool ShouldTerminate, int ConsecutiveErrorCount)> InvokeApprovedFunctionApprovalResponsesAsync(
ChatCompletion\ImageGeneratingChatClient.cs (3)
71public override async Task<ChatResponse> GetResponseAsync( 368public async Task<string> GenerateImageAsync( 420public async Task<string> EditImageAsync(
ChatCompletion\LoggingChatClient.cs (1)
54public override async Task<ChatResponse> GetResponseAsync(
ChatCompletion\OpenTelemetryChatClient.cs (1)
135public override async Task<ChatResponse> GetResponseAsync(
ChatCompletion\OpenTelemetryImageGenerator.cs (1)
104public 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)
ChatRouting\FailoverChatClient.cs (1)
97public sealed override async Task<ChatResponse> GetResponseAsync(
ChatRouting\SemanticRoutingChatClient.cs (1)
301private async Task<EmbeddedProfile[]> EnsureIndexAsync(CancellationToken cancellationToken)
Common\FunctionInvocationProcessor.cs (3)
62public async Task<List<FunctionInvocationResult>> ProcessFunctionCallsAsync( 106private async Task<FunctionInvocationResult> ProcessSingleFunctionCallAsync( 155private async Task<object?> InstrumentedInvokeFunctionAsync(FunctionInvocationContext context, 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)
96public override async Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(IEnumerable<TInput> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)
Files\LoggingHostedFileClient.cs (4)
59public override async Task<HostedFileContent> UploadAsync( 108public override async Task<HostedFileDownloadStream> DownloadAsync( 144public override async Task<HostedFileContent?> GetFileInfoAsync( 263public override async Task<bool> DeleteAsync(
Files\OpenTelemetryHostedFileClient.cs (4)
135public override async Task<HostedFileContent> UploadAsync( 199public override async Task<HostedFileDownloadStream> DownloadAsync( 236public override async Task<HostedFileContent?> GetFileInfoAsync( 363public override async Task<bool> DeleteAsync(
Image\ConfigureOptionsImageGenerator.cs (1)
39public override async Task<ImageGenerationResponse> GenerateAsync(
Image\LoggingImageGenerator.cs (1)
58public override async Task<ImageGenerationResponse> GenerateAsync(
Realtime\FunctionInvokingRealtimeClient.cs (1)
125public override async Task<IRealtimeClientSession> CreateSessionAsync(
Realtime\FunctionInvokingRealtimeClientSession.cs (1)
319private async Task<(bool shouldTerminate, int newConsecutiveErrorCount, List<RealtimeClientMessage> functionResults)> InvokeFunctionsAsync(
Realtime\LoggingRealtimeClient.cs (1)
47public override async Task<IRealtimeClientSession> CreateSessionAsync(
Realtime\OpenTelemetryRealtimeClient.cs (1)
61public override async Task<IRealtimeClientSession> CreateSessionAsync(
SpeechToText\ConfigureOptionsSpeechToTextClient.cs (1)
41public override async Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\LoggingSpeechToTextClient.cs (1)
58public override async Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\OpenTelemetrySpeechToTextClient.cs (1)
106public override async Task<SpeechToTextResponse> GetTextAsync(Stream audioSpeechStream, SpeechToTextOptions? options = null, CancellationToken cancellationToken = default)
TextToSpeech\ConfigureOptionsTextToSpeechClient.cs (1)
40public override async Task<TextToSpeechResponse> GetAudioAsync(
TextToSpeech\LoggingTextToSpeechClient.cs (1)
57public override async Task<TextToSpeechResponse> GetAudioAsync(
TextToSpeech\OpenTelemetryTextToSpeechClient.cs (1)
105public override async Task<TextToSpeechResponse> GetAudioAsync(string text, TextToSpeechOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Abstractions (57)
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);
ChatRouting\RoutingChatClient.cs (1)
64public virtual async Task<ChatResponse> GetResponseAsync(
Embeddings\DelegatingEmbeddingGenerator.cs (1)
44public virtual Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(IEnumerable<TInput> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default) =>
Embeddings\EmbeddingGeneratorExtensions.cs (3)
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(
Files\DelegatingHostedFileClient.cs (4)
39public virtual Task<HostedFileContent> UploadAsync( 48public virtual Task<HostedFileDownloadStream> DownloadAsync( 55public virtual Task<HostedFileContent?> GetFileInfoAsync( 68public virtual Task<bool> DeleteAsync(
Files\HostedFileClientExtensions.cs (5)
32public static Task<HostedFileContent> UploadAsync( 59public static async Task<HostedFileContent> UploadAsync( 93public static async Task<string> DownloadToAsync( 149public static Task<HostedFileDownloadStream> DownloadAsync( 183public static async Task<DataContent> DownloadAsDataContentAsync(
Files\HostedFileDownloadStream.cs (1)
97public virtual async Task<DataContent> ToDataContentAsync(CancellationToken cancellationToken = default)
Files\IHostedFileClient.cs (4)
44Task<HostedFileContent> UploadAsync( 62Task<HostedFileDownloadStream> DownloadAsync( 76Task<HostedFileContent?> GetFileInfoAsync( 100Task<bool> DeleteAsync(
Functions\AIFunctionDeclaration.cs (1)
57/// For methods returning <see cref="Task{TResult}"/> or <see cref="ValueTask{TResult}"/>, the schema is based on the
Functions\AIFunctionFactory.cs (10)
120/// For methods returning <see cref="Task{TResult}"/> or <see cref="ValueTask{TResult}"/>, the schema is derived from the 197/// For methods returning <see cref="Task{TResult}"/> or <see cref="ValueTask{TResult}"/>, the schema is derived from the unwrapped result type. 289/// For methods returning <see cref="Task{TResult}"/> or <see cref="ValueTask{TResult}"/>, the schema is derived from the 376/// For methods returning <see cref="Task{TResult}"/> or <see cref="ValueTask{TResult}"/>, the schema is derived from the unwrapped result type. 481/// For methods returning <see cref="Task{TResult}"/> or <see cref="ValueTask{TResult}"/>, the schema is derived from the 895if (t == typeof(Task<>) || t == typeof(ValueTask<>) || t == typeof(IAsyncEnumerable<>)) 1027/// Gets a delegate for handling the result value of a method, converting it into the <see cref="Task{FunctionResult}"/> to return from the invocation. 1091if (returnType.GetGenericTypeDefinition() == typeof(Task<>)) 1208private static readonly MethodInfo _taskGetResult = typeof(Task<>).GetProperty(nameof(Task<int>.Result), BindingFlags.Instance | BindingFlags.Public)!.GetMethod!;
Functions\AIFunctionFactoryOptions.cs (2)
104/// Methods strongly typed to return types of <see cref="Task"/>, <see cref="Task{TResult}"/>, <see cref="ValueTask"/>, 107/// 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(
Realtime\DelegatingRealtimeClient.cs (1)
44public virtual Task<IRealtimeClientSession> CreateSessionAsync(
Realtime\IRealtimeClient.cs (1)
21Task<IRealtimeClientSession> CreateSessionAsync(RealtimeSessionOptions? options = null, CancellationToken cancellationToken = default);
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(
TextToSpeech\DelegatingTextToSpeechClient.cs (1)
44public virtual Task<TextToSpeechResponse> GetAudioAsync(
TextToSpeech\ITextToSpeechClient.cs (1)
36Task<TextToSpeechResponse> GetAudioAsync(
TextToSpeech\TextToSpeechResponseUpdateExtensions.cs (2)
41public static Task<TextToSpeechResponse> ToTextToSpeechResponseAsync( 48static async Task<TextToSpeechResponse> ToResponseAsync(
Microsoft.Extensions.AI.Abstractions.Tests (29)
ChatCompletion\DelegatingChatClientTests.cs (1)
43var resultTask = delegating.GetResponseAsync(expectedChatContents, expectedChatOptions, expectedCancellationToken);
ChatRouting\RoutingChatClientTests.cs (2)
131private static async Task<List<ChatResponseUpdate>> CollectAsync( 162public Task<ChatResponse> GetResponseAsync(
Embeddings\DelegatingEmbeddingGeneratorTests.cs (1)
42var resultTask = delegating.GenerateAsync(expectedInput, options: null, expectedCancellationToken);
Files\DelegatingHostedFileClientTests.cs (4)
47var resultTask = delegating.UploadAsync(expectedStream, expectedMediaType, expectedFileName, expectedOptions, expectedCancellationToken); 73var resultTask = delegating.DownloadAsync(expectedFileId, expectedOptions, expectedCancellationToken); 101var resultTask = delegating.GetFileInfoAsync(expectedFileId, expectedOptions, expectedCancellationToken); 158var resultTask = delegating.DeleteAsync(expectedFileId, expectedOptions, 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)
TestHostedFileClient.cs (8)
21public Func<Stream, string?, string?, HostedFileClientOptions?, CancellationToken, Task<HostedFileContent>>? UploadAsyncCallback { get; set; } 23public Func<string, HostedFileClientOptions?, CancellationToken, Task<HostedFileDownloadStream>>? DownloadAsyncCallback { get; set; } 25public Func<string, HostedFileClientOptions?, CancellationToken, Task<HostedFileContent?>>? GetFileInfoAsyncCallback { get; set; } 29public Func<string, HostedFileClientOptions?, CancellationToken, Task<bool>>? DeleteAsyncCallback { get; set; } 36public Task<HostedFileContent> UploadAsync( 44public Task<HostedFileDownloadStream> DownloadAsync( 50public Task<HostedFileContent?> GetFileInfoAsync( 61public Task<bool> DeleteAsync(
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(
TestTextToSpeechClient.cs (2)
24Task<TextToSpeechResponse>>? 40public Task<TextToSpeechResponse> GetAudioAsync(
TextToSpeech\DelegatingTextToSpeechClientTests.cs (1)
43var resultTask = delegating.GetAudioAsync(expectedText, expectedOptions, expectedCancellationToken);
Microsoft.Extensions.AI.Evaluation (6)
Utilities\TaskExtensions.cs (5)
16this IEnumerable<Func<CancellationToken, Task<T>>> functions, 20IEnumerable<Task<T>> concurrentTasks = functions.Select(f => f(cancellationToken)); 43this IEnumerable<Task<T>> concurrentTasks, 49foreach (Task<T> task in concurrentTasks) 59await foreach (Task<T> task in
Utilities\TimingHelper.cs (1)
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)
203private static async Task<(IEnumerable<ChatMessage> messages, ChatResponse response)> 216private 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)
76public 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)
62public async Task<byte[]?> GetAsync(string key, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (1)
ResultStoreTester.cs (1)
41private 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 (17)
CallCountingChatClient.cs (1)
19public override Task<ChatResponse> GetResponseAsync(
CallCountingEmbeddingGenerator.cs (1)
20public override Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(
ChatClientIntegrationTests.cs (1)
1383public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
ImageGeneratingChatClientIntegrationTests.cs (2)
69protected async Task<ChatResponse> GetResponseAsync(bool useStreaming, IEnumerable<ChatMessage> messages, ChatOptions? options = null, IChatClient? chatClient = null) 412public 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(
VerbatimHttpHandler.cs (1)
44protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
VerbatimMultiPartHttpHandler.cs (1)
46protected override async Task<HttpResponseMessage> SendAsync(
Microsoft.Extensions.AI.OllamaSharp.Integration.Tests (1)
OllamaSharpChatClientIntegrationTests.cs (1)
110public override Task<ChatResponse> GetResponseAsync(
Microsoft.Extensions.AI.OpenAI (23)
OpenAIChatClient.cs (5)
34private static readonly Func<ChatClient, IEnumerable<OpenAI.Chat.ChatMessage>, ChatCompletionOptions, RequestOptions, Task<ClientResult<ChatCompletion>>>? 36(Func<ChatClient, IEnumerable<OpenAI.Chat.ChatMessage>, ChatCompletionOptions, RequestOptions, Task<ClientResult<ChatCompletion>>>?) 42typeof(Func<ChatClient, IEnumerable<OpenAI.Chat.ChatMessage>, ChatCompletionOptions, RequestOptions, Task<ClientResult<ChatCompletion>>>)); 90public async Task<ChatResponse> GetResponseAsync( 101var task = _completeChatAsync is not null ?
OpenAIEmbeddingGenerator.cs (5)
25private static readonly Func<EmbeddingClient, IEnumerable<string>, OpenAI.Embeddings.EmbeddingGenerationOptions, RequestOptions, Task<ClientResult<OpenAIEmbeddingCollection>>>? 27(Func<EmbeddingClient, IEnumerable<string>, OpenAI.Embeddings.EmbeddingGenerationOptions, RequestOptions, Task<ClientResult<OpenAIEmbeddingCollection>>>?) 33typeof(Func<EmbeddingClient, IEnumerable<string>, OpenAI.Embeddings.EmbeddingGenerationOptions, RequestOptions, Task<ClientResult<OpenAIEmbeddingCollection>>>)); 68public async Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(IEnumerable<string> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default) 72var t = _generateEmbeddingsAsync is not null ?
OpenAIFileDownloadStream.cs (2)
45public override Task<DataContent> ToDataContentAsync(CancellationToken cancellationToken = default) 91public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) =>
OpenAIHostedFileClient.cs (4)
96public async Task<HostedFileContent> UploadAsync( 152public async Task<HostedFileDownloadStream> DownloadAsync( 185public async Task<HostedFileContent?> GetFileInfoAsync( 281public async Task<bool> DeleteAsync(
OpenAIImageGenerator.cs (1)
42public async Task<ImageGenerationResponse> GenerateAsync(ImageGenerationRequest request, ImageGenerationOptions? options = null, CancellationToken cancellationToken = default)
OpenAIRealtimeClient.cs (1)
55public async Task<IRealtimeClientSession> CreateSessionAsync(RealtimeSessionOptions? options = null, CancellationToken cancellationToken = default)
OpenAIResponsesChatClient.cs (3)
101public async Task<ChatResponse> GetResponseAsync( 114var getTask = _responseClient.GetResponseAsync(token.ResponseId, include: null, stream: null, startingAfter: null, includeObfuscation: null, cancellationToken.ToRequestOptions(streaming: false, _requestPolicies)); 125var createTask = _responseClient.CreateResponseAsync((BinaryContent)openAIOptions, cancellationToken.ToRequestOptions(streaming: false, _requestPolicies));
OpenAISpeechToTextClient.cs (1)
56public async Task<SpeechToTextResponse> GetTextAsync(
OpenAITextToSpeechClient.cs (1)
57public async Task<TextToSpeechResponse> GetAudioAsync(
Microsoft.Extensions.AI.OpenAI.Tests (8)
OpenAIHostedFileClientIntegrationTests.cs (2)
439private static async Task<T> RetryAsync<T>(Func<Task<T>> action, int maxRetries = 5, int delayMs = 2000)
OpenAIHostedFileClientTests.cs (3)
902protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) => 908protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) => 912private static async Task<List<T>> CollectAsync<T>(IAsyncEnumerable<T> source)
OpenAIRequestPoliciesTests.cs (1)
163protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
OpenAIResponseClientTests.cs (1)
6923protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
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 (56)
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 (5)
1931private static Task<List<ChatMessage>> InvokeAndAssertAsync( 1948private static async Task<List<ChatMessage>> InvokeAndAssertMultiRoundAsync( 2019private static Task<List<ChatMessage>> InvokeAndAssertStreamingAsync( 2036private static async Task<List<ChatMessage>> InvokeAndAssertStreamingMultiRoundAsync( 2124public override Task<ChatResponse> GetResponseAsync(
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
1316async Task InvokeAsync(Func<Task<List<ChatMessage>>> work) 2198private static async Task<List<ChatMessage>> InvokeAndAssertAsync( 2268private static async Task<List<ChatMessage>> InvokeAndAssertStreamingAsync(
ChatCompletion\ReducingChatClientTests.cs (1)
173public Task<IEnumerable<ChatMessage>> ReduceAsync(IEnumerable<ChatMessage> messages, CancellationToken cancellationToken)
ChatRouting\FailoverChatClientTests.cs (4)
57Task<ChatResponse> operation = streaming 81Task<ChatResponse> operation = streaming 105Task<ChatResponse> operation = streaming 1143private static async Task<List<ChatResponseUpdate>> CollectAsync(
ChatRouting\OrderedFailoverChatClientTests.cs (2)
180Task<ChatResponse>[] requests = 381public Task<ChatResponse> GetResponseAsync(
ChatRouting\SemanticRoutingChatClientTests.cs (2)
242public Task<ChatResponse> GetResponseAsync( 266public Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(
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)
217func = AIFunctionFactory.Create(Task<string> (string a) => Task.FromResult(a + " " + a)); 1499static async Task<string> FetchDataAsync() 1657typeof(Task<int>), 1670Delegate testDelegate = dynamicMethod.CreateDelegate(typeof(Func<int, Task<int>>));
Realtime\FunctionInvokingRealtimeClientTests.cs (1)
675public Task<IRealtimeClientSession> CreateSessionAsync(RealtimeSessionOptions? options = null, CancellationToken cancellationToken = default)
Realtime\LoggingRealtimeClientTests.cs (1)
471public Task<IRealtimeClientSession> CreateSessionAsync(RealtimeSessionOptions? options = null, CancellationToken cancellationToken = default)
Realtime\OpenTelemetryRealtimeClientTests.cs (1)
1115public Task<IRealtimeClientSession> CreateSessionAsync(RealtimeSessionOptions? options = null, CancellationToken cancellationToken = default)
Realtime\RealtimeClientBuilderTests.cs (2)
145public Task<IRealtimeClientSession> CreateSessionAsync(RealtimeSessionOptions? options = null, CancellationToken cancellationToken = default) 170public override async Task<IRealtimeClientSession> CreateSessionAsync(
Realtime\RealtimeClientExtensionsTests.cs (1)
114public Task<IRealtimeClientSession> CreateSessionAsync(RealtimeSessionOptions? options = null, CancellationToken cancellationToken = default)
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\TestHostedFileClient.cs (8)
21public Func<Stream, string?, string?, HostedFileClientOptions?, CancellationToken, Task<HostedFileContent>>? UploadAsyncCallback { get; set; } 23public Func<string, HostedFileClientOptions?, CancellationToken, Task<HostedFileDownloadStream>>? DownloadAsyncCallback { get; set; } 25public Func<string, HostedFileClientOptions?, CancellationToken, Task<HostedFileContent?>>? GetFileInfoAsyncCallback { get; set; } 29public Func<string, HostedFileClientOptions?, CancellationToken, Task<bool>>? DeleteAsyncCallback { get; set; } 36public Task<HostedFileContent> UploadAsync( 44public Task<HostedFileDownloadStream> DownloadAsync( 50public Task<HostedFileContent?> GetFileInfoAsync( 61public Task<bool> DeleteAsync(
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(
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestTextToSpeechClient.cs (2)
24Task<TextToSpeechResponse>>? 40public Task<TextToSpeechResponse> GetAudioAsync(
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 (23)
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 (11)
13private static readonly Task<long> _zeroTimestamp = Task.FromResult<long>(0L); 15private readonly ConcurrentDictionary<string, Task<long>> _tagInvalidationTimes = []; 18private readonly ConcurrentDictionary<string, Task<long>>.AlternateLookup<ReadOnlySpan<char>> _tagInvalidationTimesBySpan; 22private Task<long> _globalInvalidateTimestamp; 87if (_tagInvalidationTimesUseAltLookup && _tagInvalidationTimesBySpan.TryGetValue(tag, out var pending)) 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]; 223var result = results[i]; 264var results = new Task<Guid>[callerCount]; 309var result = results[i]; 346var first = cache.GetOrCreateAsync(Me(), async ct => 353var second = cache.GetOrCreateAsync(Me(), async ct => 386var first = cache.GetOrCreateAsync(Me(), async ct => 393var second = cache.GetOrCreateAsync(Me(), async ct => 430var first = cache.GetOrCreateAsync(Me(), async ct => 437var 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 (5)
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)
Microsoft.Extensions.DataIngestion.Tests (11)
Readers\DocumentReaderConformanceTests.cs (2)
152protected static async Task<HttpResponseMessage> DownloadAsync(Uri uri) 179protected static async Task<FileInfo> DownloadToFileAsync(Uri uri)
Readers\MarkdownReaderTests.cs (1)
202private 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 (4)
Logging\FakeLogCollectorTests.LogEnumeration.cs (4)
35var awaitSequenceTask = AwaitSequence( 93var abSequenceTask = AwaitSequence( 102var abcSequenceTask = AwaitSequence( 159private static async Task<(bool wasCancelled, int index)> AwaitSequence(
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 (14)
Latency\Internal\HttpLatencyMediatorTests.cs (1)
71mockHandler.Protected().Setup<Task<HttpResponseMessage>>(
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)
741protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 751protected 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 (17)
artifacts\obj\Microsoft.Extensions.Http.Resilience.Tests\Debug\net10.0\Protos\GreetGrpc.cs (1)
81public virtual global::System.Threading.Tasks.Task<global::Microsoft.Extensions.Http.Resilience.Test.Grpc.HelloReply> SayHello(global::Microsoft.Extensions.Http.Resilience.Test.Grpc.HelloRequest request, grpc::ServerCallContext context)
BuildTransitive\GrpcNetClientFactoryVersionTargetTests.cs (6)
228private static async Task<CommandResult> RunTargetAsync(string projectItems) 280private static async Task<CommandResult> RunDotNetAsync(string workingDirectory, params string[] arguments) 303var standardOutputTask = process.StandardOutput.ReadToEndAsync(); 304var standardErrorTask = process.StandardError.ReadToEndAsync(); 336private static async Task ObserveOutputTasksAsync(Task<string> standardOutputTask, Task<string> standardErrorTask)
Hedging\HedgingTests.cs (2)
308protected static Task<HttpResponseMessage> SendRequest( 348private Task<HttpResponseMessage> InnerHandlerFunction(HttpRequestMessage request, CancellationToken cancellationToken)
Hedging\StandardHedgingTests.cs (1)
352protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Helpers\TestHandlerStub.cs (3)
14private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _handlerFunc; 21public TestHandlerStub(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handlerFunc) 26protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Resilience\GrpcResilienceTests.cs (2)
87private static Task<HelloReply> SendRequest(Greeter.GreeterClient client, bool asynchronous) 119public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
39private static Task<HttpResponseMessage> SendRequest(HttpClient client, string url, bool asynchronous)
Resilience\ResilienceHandlerTest.cs (1)
162private static Task<HttpResponseMessage> InvokeHandler(
Microsoft.Extensions.Identity.Core (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 (33)
AsyncValidateOptions.cs (18)
25public AsyncValidateOptions(string? name, Func<TOptions, CancellationToken, Task<bool>> validation, string failureMessage) 42public Func<TOptions, CancellationToken, Task<bool>> Validation { get; } 77public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 112public AsyncValidateOptions(string? name, TDep dependency, Func<TOptions, TDep, CancellationToken, Task<bool>> validation, string failureMessage) 135public Func<TOptions, TDep, CancellationToken, Task<bool>> Validation { get; } 162public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 197public AsyncValidateOptions(string? name, TDep1 dependency1, TDep2 dependency2, Func<TOptions, TDep1, TDep2, CancellationToken, Task<bool>> validation, string failureMessage) 226public Func<TOptions, TDep1, TDep2, CancellationToken, Task<bool>> Validation { get; } 253public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 290public AsyncValidateOptions(string? name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, Func<TOptions, TDep1, TDep2, TDep3, CancellationToken, Task<bool>> validation, string failureMessage) 325public Func<TOptions, TDep1, TDep2, TDep3, CancellationToken, Task<bool>> Validation { get; } 352public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 391public AsyncValidateOptions(string? name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, Func<TOptions, TDep1, TDep2, TDep3, TDep4, CancellationToken, Task<bool>> validation, string failureMessage) 432public Func<TOptions, TDep1, TDep2, TDep3, TDep4, CancellationToken, Task<bool>> Validation { get; } 459public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 500public 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) 547public Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, CancellationToken, Task<bool>> Validation { get; } 574public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default)
IAsyncValidateOptions.cs (1)
26Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default);
NamedAsyncValidateOptionsFilter.cs (1)
38public Task<ValidateOptionsResult> ValidateAsync(
OptionsBuilder.cs (12)
593public virtual OptionsBuilder<TOptions> Validate(Func<TOptions, CancellationToken, Task<bool>> validation) 602public virtual OptionsBuilder<TOptions> Validate(Func<TOptions, CancellationToken, Task<bool>> validation, string failureMessage) 617public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, CancellationToken, Task<bool>> validation) where TDep : notnull 627public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, CancellationToken, Task<bool>> validation, string failureMessage) where TDep : notnull 647public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2>(Func<TOptions, TDep1, TDep2, CancellationToken, Task<bool>> validation) 660public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2>(Func<TOptions, TDep1, TDep2, CancellationToken, Task<bool>> validation, string failureMessage) 684public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3>(Func<TOptions, TDep1, TDep2, TDep3, CancellationToken, Task<bool>> validation) 699public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3>(Func<TOptions, TDep1, TDep2, TDep3, CancellationToken, Task<bool>> validation, string failureMessage) 726public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3, TDep4>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, CancellationToken, Task<bool>> validation) 743public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3, TDep4>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, CancellationToken, Task<bool>> validation, string failureMessage) 773public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3, TDep4, TDep5>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, CancellationToken, Task<bool>> validation) 792public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3, TDep4, TDep5>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, CancellationToken, Task<bool>> validation, string failureMessage)
OptionsFactory.cs (1)
109internal async Task<TOptions> CreateAsync(string name, CancellationToken cancellationToken)
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 (3)
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(
OptionsBuilderDataAnnotationsExtensions.cs (1)
87public Task<ValidateOptionsResult> ValidateAsync(
Microsoft.Extensions.ServiceDiscovery (2)
Http\ResolvingHttpClientHandler.cs (1)
17protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Http\ResolvingHttpDelegatingHandler.cs (1)
41protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (3)
Resolver\CancellationTests.cs (1)
31var task = Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await Resolver.ResolveIPAddressesAsync("example.com", AddressFamily.InterNetwork, cts.Token));
Resolver\LoopbackDnsServer.cs (1)
32private static async Task<int> ProcessRequestCore(IPEndPoint remoteEndPoint, ArraySegment<byte> message, Func<LoopbackDnsResponseBuilder, IPEndPoint, Task> action, Memory<byte> responseBuffer)
Resolver\RetryTests.cs (1)
281private async Task<AddressResult[]> RunWithFallbackServerHelper(string name, Func<LoopbackDnsResponseBuilder, Task> primaryHandler, Func<LoopbackDnsResponseBuilder, Task> fallbackHandler)
Microsoft.Extensions.ServiceDiscovery.Yarp (3)
ServiceDiscoveryDestinationResolver.cs (3)
27var tasks = new List<Task<(List<(string Name, DestinationConfig Config)>, IChangeToken ChangeToken)>>(destinations.Count); 35foreach (var task in tasks) 52private async Task<(List<(string Name, DestinationConfig Config)>, IChangeToken ChangeToken)> ResolveHostAsync(
Microsoft.Extensions.TimeProvider.Testing.Tests (6)
FakeTimeProviderTests.cs (6)
375var t = source.Task.WaitAsync(TimeSpan.FromSeconds(100000), timeProvider, CancellationToken.None); 395var t = source.Task.WaitAsync(TimeSpan.FromMilliseconds(-1), timeProvider, CancellationToken.None); 414var t = source.Task.WaitAsync(TimeSpan.FromMilliseconds(1), timeProvider, CancellationToken.None); 433var t = source.Task.WaitAsync(_infiniteTimeout, timeProvider, cts.Token); 537async Task<int> simulatedPollyRetry() 564var result = simulatedPollyRetry();
Microsoft.Extensions.VectorData.Abstractions (13)
ProviderServices\EmbeddingGenerationDispatcher.cs (2)
49public abstract Task<IReadOnlyList<Embedding>> GenerateEmbeddingsAsync(VectorPropertyModel vectorProperty, IEnumerable<object?> values, CancellationToken cancellationToken); 55public abstract Task<Embedding> GenerateEmbeddingAsync(VectorPropertyModel vectorProperty, object? value, CancellationToken cancellationToken);
ProviderServices\EmbeddingGenerationDispatcher{TEmbedding}.cs (2)
35public override Task<IReadOnlyList<Embedding>> GenerateEmbeddingsAsync(VectorPropertyModel vectorProperty, IEnumerable<object?> values, CancellationToken cancellationToken) 39public override Task<Embedding> GenerateEmbeddingAsync(VectorPropertyModel vectorProperty, object? value, CancellationToken cancellationToken)
ProviderServices\VectorPropertyModel.cs (4)
134public Task<IReadOnlyList<Embedding>> GenerateEmbeddingsAsync(IEnumerable<object?> values, CancellationToken cancellationToken) 144public Task<Embedding> GenerateEmbeddingAsync(object? value, CancellationToken cancellationToken) 152internal virtual async Task<IReadOnlyList<Embedding>> GenerateEmbeddingsCoreAsync<TEmbedding>(IEnumerable<object?> values, CancellationToken cancellationToken) 179internal virtual async Task<Embedding> GenerateEmbeddingCoreAsync<TEmbedding>(object? value, CancellationToken cancellationToken)
ProviderServices\VectorPropertyModel{TInput}.cs (2)
37internal override async Task<IReadOnlyList<Embedding>> GenerateEmbeddingsCoreAsync<TEmbedding>(IEnumerable<object?> values, CancellationToken cancellationToken) 51internal override async Task<Embedding> GenerateEmbeddingCoreAsync<TEmbedding>(object? value, CancellationToken cancellationToken)
VectorStore.cs (1)
63public abstract Task<bool> CollectionExistsAsync(string name, CancellationToken cancellationToken = default);
VectorStoreCollection.cs (2)
38public abstract Task<bool> CollectionExistsAsync(CancellationToken cancellationToken = default); 63public abstract Task<TRecord?> GetAsync(TKey key, RecordRetrievalOptions? options = default, CancellationToken cancellationToken = default);
Microsoft.Extensions.VectorData.Abstractions.Tests (1)
CollectionModelBuilderTests.cs (1)
571public Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(
Microsoft.Extensions.VectorData.ConformanceTests (7)
DependencyInjectionTests.cs (3)
267public override Task<bool> CollectionExistsAsync(string name, CancellationToken cancellationToken = default) 285public override Task<bool> CollectionExistsAsync(CancellationToken cancellationToken = default) 293public override Task<TRecord?> GetAsync(TKey key, RecordRetrievalOptions? options = null, CancellationToken cancellationToken = default)
EmbeddingGenerationTests.cs (2)
581public Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync( 613public Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(IEnumerable<Customer> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)
TypeTests\EmbeddingTypeTests.cs (2)
182public Task<GeneratedEmbeddings<Embedding<T>>> GenerateAsync( 197public Task<GeneratedEmbeddings<BinaryEmbedding>> GenerateAsync(
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)
163private 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)
325private 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)
198private 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)
144private 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)
parent\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)
parent\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)
parent\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)
parent\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 (4)
Infrastructure\PendingAsyncCall.cs (1)
14public Task<TValue> Task => _completion.Task;
Infrastructure\TaskGenericsUtil.cs (2)
44(!taskType.IsGenericType || taskType.GetGenericTypeDefinition() != typeof(Task<>))) 69public object? GetResult(Task task) => ((Task<T>)task).Result!;
JSRuntime.cs (1)
273protected 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.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)
Generated\361d1da7f942c932\Mistral_7B_Instruct_5b3aee26-c7ed-41a1-8b85-2171e3946c73.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)
parent\6a273e5f1a281752\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
287public static async Task<bool> Download(string url, string destDir, string destFileName)
parent\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)
parent\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
255public static async Task<bool> Download(string url, string destDir, string destFileName)
parent\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
243public static async Task<bool> Download(string url, string destDir, string destFileName)
parent\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
264public static async Task<bool> Download(string url, string destDir, string destFileName)
Microsoft.ML.SamplesUtils (1)
SamplesDatasetUtils.cs (1)
191private static async Task<string> Download(string baseGitPath, string dataFile)
Microsoft.ML.Sweeper (3)
AsyncSweeper.cs (3)
50Task<ParameterSetWithId> ProposeAsync(); 111public Task<ParameterSetWithId> ProposeAsync() 276public async Task<ParameterSetWithId> ProposeAsync()
Microsoft.ML.Sweeper.Tests (11)
TestSweeper.cs (11)
148var task = sweeper.ProposeAsync(); 170var task = gridSweeper.ProposeAsync(); 203var tasks = new List<Task<ParameterSetWithId>>(); 207var task = sweeper.ProposeAsync(); 221foreach (var task in tasks) 257var task = sweeper.ProposeAsync(); 268var tasks = new Task<ParameterSetWithId>[sweeps]; 275var task = sweeper.ProposeAsync(); 286var task = sweeper.ProposeAsync(); 331var r = Task.Run(() => Parallel.For(0, sweeps, options, async (int i) => 333var task = sweeper.ProposeAsync();
Microsoft.ML.TestFramework (1)
TestCommandBase.cs (1)
999var t = new Task<int>[2];
Microsoft.ML.Tokenizers (10)
Model\BertTokenizer.cs (2)
692public static async Task<BertTokenizer> CreateAsync( 717public static async Task<BertTokenizer> CreateAsync(
Model\BPETokenizer.cs (1)
262public static async Task<BpeTokenizer> CreateAsync(
Model\TiktokenTokenizer.cs (3)
1395public static async Task<TiktokenTokenizer> CreateAsync( 1427public static async Task<TiktokenTokenizer> CreateAsync( 1492public 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)
parent\parent\src\Microsoft.ML.Tokenizers\Utils\Helpers.netcoreapp.cs (1)
26public static Task<Stream> GetStreamAsync(HttpClient client, string url, CancellationToken cancellationToken = default) =>
Microsoft.NET.Build.Containers (68)
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 (3)
27public async Task<bool> ExistsAsync(string repositoryName, string reference, CancellationToken cancellationToken) 40public async Task<HttpResponseMessage> GetAsync(string repositoryName, string reference, CancellationToken cancellationToken) 68private 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 (2)
14public Task<bool> ExistsAsync(string repositoryName, string reference, CancellationToken cancellationToken); 16public 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)
55internal async Task<bool> ExecuteAsync(CancellationToken cancellationToken) 99private async Task<bool> ExecuteAsyncCore(ILogger logger, ILoggerFactory msbuildLoggerFactory, CancellationToken cancellationToken)
Microsoft.NET.ProjectData (12)
CacheFileReader.cs (10)
89 public static Task<ImmutableArray<CachedSliceData>> ReadProjectCacheAsync( 95 public static Task<ImmutableArray<CachedSliceData>> ReadProjectCacheAsync( 102 public static Task<ImmutableArray<CachedSliceData>> ReadProjectCacheAsync( 112 public static Task<ImmutableArray<ProjectDataSnapshot>> ReadProjectDataSnapshotsAsync( 123 public static async Task<ImmutableArray<ProjectDataSnapshot>> ReadProjectDataSnapshotsAsync( 143 public static Task<ImmutableArray<CachedSliceData>> ReadProjectCacheAsync( 151 public static async Task<ImmutableArray<CachedSliceData>> ReadProjectCacheAsync( 173 public static async Task<ProjectDataCacheReadResult> ReadProjectCacheWithSourceAsync( 279 private static async Task<ImmutableArray<CachedSliceData>> ReadCacheFileAsync( 367 public static async Task<ImmutableArray<CachedSliceData>> ReadFromAsync(
Donor\ProjectDataDonorIndex.Git.cs (2)
136 Task<string> outputTask = process.StandardOutput.ReadToEndAsync(); 137 Task<string> errorTask = process.StandardError.ReadToEndAsync();
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);
parent\Tool\Client.cs (1)
40public static async Task<Client> ConnectAsync(string pipeName, TimeSpan? timeout, CancellationToken cancellationToken)
parent\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);
parent\Tool\ServerProtocol\ServerRequest.cs (1)
123public static async Task<ServerRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken)
parent\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( 170Task<ICreationResult> IGenerator.CreateAsync( 199Task<ICreationResult> IGenerator.CreateAsync( 210Task<ICreationEffects> IGenerator.GetCreationEffectsAsync( 295internal static async Task<ICreationResult> CreateAsync( 331internal 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 (6)
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)
SocketServer.cs (2)
24private readonly Func<TcpListener, Task<TcpClient>> _acceptClientAsync; 55Func<TcpListener, Task<TcpClient>> acceptClientAsync)
Microsoft.TestPlatform.CrossPlatEngine (5)
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)
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
ProcDumpDumper.cs (1)
180var procDumpExit = Task.Run(() => _procDumpProcess.WaitForExit(_timeout));
Microsoft.TestPlatform.TestHostRuntimeProvider (2)
Hosting\DefaultTestHostManager.cs (1)
162public Task<bool> LaunchTestHostAsync(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken)
Hosting\DotnetTestHostManager.cs (1)
225public Task<bool> LaunchTestHostAsync(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken)
Microsoft.TestPlatform.Utilities (5)
CodeCoverageDataAttachmentsHandler.cs (5)
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) 133if (mergeResult is not Task<IList<string>> task) 138typeof(Task<IList<string>>),
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (4)
Interfaces\ITranslationLayerRequestSenderAsync.cs (1)
27Task<int> InitializeCommunicationAsync(int clientConnectionTimeout);
VsTestConsoleRequestSender.cs (3)
118public async Task<int> InitializeCommunicationAsync(int clientConnectionTimeout) 513private async Task<bool> HandShakeWithVsTestConsoleAsync() 1023private async Task<Message> TryReceiveMessageAsync()
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\ApplicationServices\SingleInstanceHelpers.vb (1)
17cancellationToken As CancellationToken) As Task(Of String())
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)
parent\Shared\NodeEndpointOutOfProcBase.cs (1)
686Task<int> readTask = localReadPipe.ReadAsync(headerByte.AsMemory(), CancellationToken.None).AsTask();
MSBuild.Coordinator (1)
CoordinatorServer.cs (1)
130private async Task<NamedPipeServerStream?> WaitForClientAsync(CancellationToken token)
mscorlib (1)
parent\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)
217private 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)
37internal static Task<int> Run(PackageUpdateArgs args, IVirtualProjectBuilder? virtualProjectBuilder, CancellationToken cancellationToken) 57internal static async Task<int> Run(PackageUpdateArgs args, ILoggerWithColor logger, IPackageUpdateIO packageUpdateIO, CancellationToken cancellationToken) 135private static async Task<(List<PackageUpdateResult> vulnerablePackages, HashSet<string> packagesScanned)> SelectVulnerablePackagesToUpdateAsync( 315private static async Task<(int? exitCode, Dictionary<string, List<PackageUpdateResult>> projectPackageUpdates, int totalPackagesScanned)> 420private static async Task<(int? exitCode, int totalPackagesScanned)> ProcessProjectsInParallelAsync( 423Func<string, CancellationToken, Task<(List<PackageUpdateResult>? packagesToUpdate, HashSet<string> scannedPackages, int? errorExitCode)>> processProject, 461internal static async Task<(List<PackageUpdateResult>?, HashSet<string> scannedPackages)> SelectSpecificPackagesToUpdateAsync( 620internal 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( 918private 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, 260internal static async Task<List<KeyValuePair<PackageSource, ImmutableArray<NuGetVersion>>>> GetSourceInfosForIdAsync( 274foreach (var task in tasks) 288internal 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)
177/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="LibraryIdentity" /> 189public async Task<LibraryIdentity> FindLibraryAsync( 244private async Task<LibraryIdentity> FindLibraryCoreAsync( 330/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="LibraryDependencyInfo" /> 342public Task<LibraryDependencyInfo> GetDependenciesAsync( 381private async Task<LibraryDependencyInfo> GetDependenciesCoreAsync( 454/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="IPackageDownloader" /> 464public async Task<IPackageDownloader> GetPackageDownloaderAsync( 640/// The task result (<see cref="Task{TResult}.Result" />) returns an 642public async Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync( 651internal 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) 133Task<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)
88private static async Task<IEnumerable<ICredentialProvider>> GetCredentialProvidersAsync(ILogger logger)
DefaultNetworkCredentialsCredentialProvider.cs (1)
39public Task<CredentialResponse> GetAsync(
ICredentialProvider.cs (1)
33Task<CredentialResponse> GetAsync(
PluginCredentialProvider.cs (1)
90public Task<CredentialResponse> GetAsync(
SecurePluginCredentialProvider.cs (1)
87public async Task<CredentialResponse> GetAsync(
SecurePluginCredentialProviderBuilder.cs (1)
41public 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( 124Task<IEnumerable<NuGetVersion>?> GetAllVersionsAsync(
Providers\LocalDependencyProvider.cs (7)
65/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="LibraryIdentity" /> 71public Task<LibraryIdentity?> FindLibraryAsync( 107/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="LibraryDependencyInfo" /> 113public Task<LibraryDependencyInfo> GetDependenciesAsync( 149/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="IPackageDownloader" /> 152public Task<IPackageDownloader> GetPackageDownloaderAsync( 161public Task<IEnumerable<NuGetVersion>?> GetAllVersionsAsync(
Remote\RemoteDependencyWalker.cs (6)
29public async Task<GraphNode<RemoteResolveResult>> WalkAsync(LibraryRange library, NuGetFramework framework, string? runtimeIdentifier, RuntimeGraph? runtimeGraph, bool recursive) 171var newGraphItemTask = ResolverUtility.FindLibraryCachedAsync( 586private async Task<GraphNode<RemoteResolveResult>> AddTransitiveCentralPackageVersionNodesAsync( 731/// 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}"/>. 733public readonly Task<GraphItem<RemoteResolveResult>> GraphItemTask; 750public 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 (503)
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>>>(); 106/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="Plugin" /> 122public virtual async Task<IPlugin> GetOrCreateAsync( 158(path) => new Lazy<Task<IPlugin>>( 167private async Task<IPlugin> CreatePluginAsync( 315/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="Plugin" /> 324public static async Task<IPlugin> CreateFromCurrentProcessAsync( 391if (_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\PackageStagingResourceV3Provider.cs (1)
28public override async Task<Tuple<bool, INuGetResource?>> TryCreate(
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)
55public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token) 120private async Task<ServiceIndexResourceV3?> GetServiceIndexResourceV3( 198private async Task<ServiceIndexResourceV3> ConsumeServiceIndexStreamAsync(Stream stream, DateTime utcNow, PackageSource source, CancellationToken token) 216private static async Task<ServiceIndexResourceV3> ConsumeServiceIndexStreamStjAsync(Stream stream, DateTime utcNow, PackageSource source, CancellationToken token) 255private 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)
57public override async Task<IEnumerable<IPackageSearchMetadata>> SearchAsync(string searchTerm, SearchFilter filter, int skip, int take, Common.ILogger log, CancellationToken cancellationToken) 99private async Task<T> SearchPage<T>( 100Func<Uri, Task<T>> getResultAsync, 205internal async Task<IReadOnlyList<PackageSearchMetadata>> Search( 227internal async Task<IReadOnlyList<PackageSearchMetadata>> ProcessHttpStreamTakeCountedItemAsync(HttpResponseMessage? httpInitialResponse, int take, CancellationToken token) 238private async Task<V3SearchResults?> ProcessHttpStreamWithoutBufferingAsync(HttpResponseMessage? httpInitialResponse, uint take, CancellationToken token) 261private static async Task<V3SearchResults?> ProcessHttpStreamWithStjAsync(HttpResponseMessage httpInitialResponse, uint take, CancellationToken token) 282private 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);
PromptAgentChat (1)
Program.cs (1)
26static async Task<IResult> InvokeAgentAsync(string agentResourceName, string message)
Publishers.Frontend (1)
Program.cs (1)
37public async Task<string> GetDataAsync(CancellationToken cancellationToken = default)
Roslyn.Diagnostics.Analyzers (206)
AbstractApplyTraitToClass`1.cs (1)
67private async Task<Document> ApplyTraitToClassAsync(State state, CancellationToken cancellationToken)
AbstractCreateTestAccessor`1.cs (1)
58private async Task<Document> CreateTestAccessorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
AbstractExposeMemberForTesting`1.cs (2)
82private async Task<TTypeDeclarationSyntax?> GetRelevantTypeFromHeaderAsync(CodeRefactoringContext context) 100private async Task<Solution> AddMemberToTestAccessorAsync(Document document, TextSpan sourceSpan, string memberName, string memberDocumentationCommentId, CancellationToken cancellationToken)
AbstractRunIterations`1.cs (1)
81private static async Task<Document> RunIterationsAsync(Document document, TMethodDeclarationSyntax method, bool convertToTheory, CancellationToken cancellationToken)
ExportedPartsShouldHaveImportingConstructorCodeFixProvider.cs (4)
45Func<CancellationToken, Task<Document>> createChangedDocument; 79private static async Task<Document> AddExplicitImportingConstructorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 141private static async Task<Document> MakeConstructorPublicAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 158private static async Task<Document> AddImportingConstructorAttributeAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (6)
42Func<CancellationToken, Task<Document>> createChangedDocument; 85private async Task<Document> AddObsoleteAttributeAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 117private static async Task<Document> AddDescriptionAndErrorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 138private static async Task<Document> UpdateDescriptionAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 163private static async Task<Document> AddErrorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 182private static async Task<Document> SetErrorToTrueAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs (1)
61private static Task<Document> AddSharedAttributeAsync(Document document, SyntaxNode root, SyntaxNode declaration)
src\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)
337public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
612Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
596public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 607public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 618public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
98private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 228async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 260public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 262Task<(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 (1)
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(
Roslyn.Diagnostics.VisualBasic.Analyzers (9)
src\f388afcd21099bcf\VisualBasicInitializeParameterService.vb (1)
53Protected Overrides Function TryAddAssignmentForPrimaryConstructorAsync(document As Document, parameter As IParameterSymbol, fieldOrProperty As ISymbol, cancellationToken As CancellationToken) As Task(Of Solution)
src\f736901a33c2b55b\VisualBasicMoveDeclarationNearReferenceService.vb (1)
45Protected Overrides Function TypesAreCompatibleAsync(document As Document, localSymbol As ILocalSymbol, declarationStatement As LocalDeclarationStatementSyntax, right As SyntaxNode, cancellationToken As CancellationToken) As Task(Of Boolean)
src\f736901a33c2b55b\VisualBasicTypeInferenceService.TypeInferrer.vb (3)
476Dim taskOfT = Me.Compilation.GetTypeByMetadataName(GetType(Task(Of)).FullName) 911If name.Equals(NameOf(Task(Of Integer).ConfigureAwait)) AndAlso 915ElseIf name.Equals(NameOf(Task(Of Integer).ContinueWith)) Then
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeFixesAndRefactorings\VisualBasicFixAllSpanMappingService.vb (1)
22Protected Overrides Function GetFixAllSpansIfWithinGlobalStatementAsync(document As Document, diagnosticSpan As TextSpan, cancellationToken As CancellationToken) As Task(Of ImmutableDictionary(Of Document, ImmutableArray(Of TextSpan)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
29cancellationToken As CancellationToken) As Task(Of Document)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
46Public Overrides Async Function GetSyntaxAsync(Optional cancellationToken As CancellationToken = Nothing) As Task(Of SyntaxNode)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxFactsService.vb (1)
38Public Function GetSelectedFieldsAndPropertiesAsync(tree As SyntaxTree, textSpan As TextSpan, allowPartialSelection As Boolean, cancellationToken As CancellationToken) As Task(Of ImmutableArray(Of SyntaxNode)) Implements ISyntaxFactsService.GetSelectedFieldsAndPropertiesAsync
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);
SelectTests (4)
GraphAffectedProjects.cs (2)
547var stdoutTask = process.StandardOutput.ReadToEndAsync(); 548var stderrTask = process.StandardError.ReadToEndAsync();
Program.cs (2)
1367var stdoutTask = process.StandardOutput.ReadToEndAsync(); 1368var stderrTask = process.StandardError.ReadToEndAsync();
Shared.Tests (1)
Memoization\MemoizeTests.cs (1)
24Func<int, Task<int>> doubler = x => Task.FromResult(x * 2);
Stress.ApiService (4)
artifacts\obj\Stress.ApiService\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.ApiService\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.ApiService\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)
LargeTelemetryGenerator.cs (1)
39public async Task<bool> TryGenerateAsync(LargeTelemetryGenerationOptions options, CancellationToken cancellationToken)
Stress.AppHost (3)
InteractionCommands.cs (3)
20var resultTask1 = interactionService.PromptConfirmationAsync("Command confirmation", "Are you sure?", cancellationToken: commandContext.CancellationToken); 21var resultTask2 = interactionService.PromptMessageBoxAsync("Command confirmation", "Are you really sure?", new MessageBoxInteractionOptions { Intent = MessageIntent.Warning, ShowSecondaryButton = true }, cancellationToken: commandContext.CancellationToken); 938var progressTask = interactionService.PromptProgressAsync(
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. 79protected abstract Task<ValidationResult?> IsValidAsync( 109/// A <see cref="Task{ValidationResult}" /> representing the asynchronous validation operation. 128public 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)
1875public 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)
433public 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)
2287public 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)
75internal static async Task<ZipCryptoStream> CreateAsync(Stream baseStream, ZipCryptoKeys keys, byte expectedCheckByte, bool encrypting, CancellationToken cancellationToken = default, bool leaveOpen = false) 203private static async Task<(uint key0, uint key1, uint key2)> ReadAndValidateHeaderCore(bool isAsync, Stream baseStream, ZipCryptoKeys keys, byte expectedCheckByte, CancellationToken cancellationToken) 388public 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)
103public 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)
385private Task<HttpResponseMessage> SendWithNtConnectionAuthAsync(HttpConnection connection, HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken) 395public 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)
358public Task<bool> WaitForAvailableStreamsAsync() 2078public 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; 490public Func<SocketsHttpConnectionEvictionContext, CancellationToken, Task<bool>>? ShouldEvictConnection 676protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 700async 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)
445private async Task<(Exception? ex, bool synchronous)> SendAsyncInternal<TIOAdapter>(MailMessage message, bool invokeSendCompleted, object? userToken, bool forceWrapExceptions = false, CancellationToken cancellationToken = default) 628Task<(Exception? ex, bool _)> task = SendAsyncInternal<AsyncReadWriteAdapter>(message, true, userToken, true); 698Task<(Exception?, bool)> task = SendAsyncInternal<AsyncReadWriteAdapter>(message, false, null, true, cancellationToken); 719static 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)
132internal 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)
63public static Task<DnsResult<AddressRecord>> ResolveAddressesAsync(string name, CancellationToken cancellationToken = default) 82public static Task<DnsResult<AddressRecord>> ResolveAddressesAsync(string name, AddressFamily addressFamily, CancellationToken cancellationToken = default) 109public static Task<DnsResult<SrvRecord>> ResolveSrvAsync(string name, CancellationToken cancellationToken = default) 136public static Task<DnsResult<MxRecord>> ResolveMxAsync(string name, CancellationToken cancellationToken = default) 163public static Task<DnsResult<TxtRecord>> ResolveTxtAsync(string name, CancellationToken cancellationToken = default) 190public static Task<DnsResult<CNameRecord>> ResolveCNameAsync(string name, CancellationToken cancellationToken = default) 229public static Task<DnsResult<PtrRecord>> ResolvePtrAsync(string name, CancellationToken cancellationToken = default) 242public static Task<DnsResult<PtrRecord>> ResolvePtrAsync(IPAddress address, CancellationToken cancellationToken = default) 269public static Task<DnsResult<NsRecord>> ResolveNsAsync(string name, CancellationToken cancellationToken = default)
System\Net\DnsResolver.cs (29)
94Task<DnsResult<AddressRecord>> task = ResolveAddressesCore(async: false, name, addressFamily, default); 111Task<DnsResult<SrvRecord>> task = ResolveSrvCore(async: false, name, default); 128Task<DnsResult<MxRecord>> task = ResolveMxCore(async: false, name, default); 145Task<DnsResult<TxtRecord>> task = ResolveTxtCore(async: false, name, default); 162Task<DnsResult<CNameRecord>> task = ResolveCNameCore(async: false, name, default); 179Task<DnsResult<PtrRecord>> task = ResolvePtrCore(async: false, name, default); 195Task<DnsResult<PtrRecord>> task = ResolvePtrCore(async: false, BuildArpaName(address), default); 212Task<DnsResult<NsRecord>> task = ResolveNsCore(async: false, name, default); 226public Task<DnsResult<AddressRecord>> ResolveAddressesAsync(string name, CancellationToken cancellationToken = default) 243public Task<DnsResult<AddressRecord>> ResolveAddressesAsync(string name, AddressFamily addressFamily, CancellationToken cancellationToken = default) 259public Task<DnsResult<SrvRecord>> ResolveSrvAsync(string name, CancellationToken cancellationToken = default) 275public Task<DnsResult<MxRecord>> ResolveMxAsync(string name, CancellationToken cancellationToken = default) 291public Task<DnsResult<TxtRecord>> ResolveTxtAsync(string name, CancellationToken cancellationToken = default) 307public Task<DnsResult<CNameRecord>> ResolveCNameAsync(string name, CancellationToken cancellationToken = default) 323public Task<DnsResult<PtrRecord>> ResolvePtrAsync(string name, CancellationToken cancellationToken = default) 338public Task<DnsResult<PtrRecord>> ResolvePtrAsync(IPAddress address, CancellationToken cancellationToken = default) 354public Task<DnsResult<NsRecord>> ResolveNsAsync(string name, CancellationToken cancellationToken = default) 383private async Task<DnsResult<AddressRecord>> ResolveAddressesCore(bool async, string name, AddressFamily addressFamily, CancellationToken cancellationToken) 388Task<DnsResult<AddressRecord>> aTask = DoResolve(async, name, AddressFamily.InterNetwork, cancellationToken); 389Task<DnsResult<AddressRecord>> aaaaTask = DoResolve(async, name, AddressFamily.InterNetworkV6, cancellationToken); 399Task<DnsResult<AddressRecord>> DoResolve(bool async, string name, AddressFamily addressFamily, CancellationToken cancellationToken) 407private Task<DnsResult<SrvRecord>> ResolveSrvCore(bool async, string name, CancellationToken cancellationToken) 414private Task<DnsResult<MxRecord>> ResolveMxCore(bool async, string name, CancellationToken cancellationToken) 421private Task<DnsResult<TxtRecord>> ResolveTxtCore(bool async, string name, CancellationToken cancellationToken) 436private Task<DnsResult<CNameRecord>> ResolveCNameCore(bool async, string name, CancellationToken cancellationToken) 443private Task<DnsResult<PtrRecord>> ResolvePtrCore(bool async, string name, CancellationToken cancellationToken) 450private Task<DnsResult<NsRecord>> ResolveNsCore(bool async, string name, CancellationToken cancellationToken) 457private 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)
73public static async Task<DnsResult<AddressRecord>> ResolveAddresses(IList<IPEndPoint> servers, bool async, string name, AddressFamily addressFamily, CancellationToken cancellationToken) 86public static async Task<DnsResult<SrvRecord>> ResolveSrv(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 92public static async Task<DnsResult<MxRecord>> ResolveMx(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 98public static async Task<DnsResult<TxtRecord>> ResolveTxt(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 104public static async Task<DnsResult<CNameRecord>> ResolveCName(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 110public static async Task<DnsResult<PtrRecord>> ResolvePtr(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 116public static async Task<DnsResult<NsRecord>> ResolveNs(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 392private static async Task<DnsResponse> SendQuery(IList<IPEndPoint> servers, bool async, string name, DnsRecordType qtype, CancellationToken cancellationToken) 632private static async Task<int> SendUdpQueryAsync( 656private static async Task<(byte[]? Buffer, int Length, Exception? Error)> TryTcpFallbackAsync( 692private 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)
758var 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)
2516Task<int> t = SendAsync(new ReadOnlyMemory<byte>(buffer, offset, size), socketFlags, default).AsTask(); 2542Task<int> t = SendAsync(buffers, socketFlags); 2591Task<int> t = SendToAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask(); 2612Task<int> t = ReceiveAsync(new ArraySegment<byte>(buffer, offset, size), socketFlags, fromNetworkStream: false, default).AsTask(); 2637Task<int> t = ReceiveAsync(buffers, socketFlags); 2658Task<int> ti = TaskToAsyncResult.Unwrap<int>(asyncResult); 2682Task<SocketReceiveMessageFromResult> t = ReceiveMessageFromAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask(); 2723Task<SocketReceiveFromResult> t = ReceiveFromAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask(); 2761private 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 (26)
src\runtime\artifacts\obj\System.Net.WebClient\Release\net11.0-browser\System.Net.WebClient.notsupported.cs (26)
115public System.Threading.Tasks.Task<byte[]> DownloadDataTaskAsync(string address) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 116public System.Threading.Tasks.Task<byte[]> DownloadDataTaskAsync(System.Uri address) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 127public System.Threading.Tasks.Task<string> DownloadStringTaskAsync(string address) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 128public System.Threading.Tasks.Task<string> DownloadStringTaskAsync(System.Uri address) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 150public System.Threading.Tasks.Task<System.IO.Stream> OpenReadTaskAsync(string address) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 151public System.Threading.Tasks.Task<System.IO.Stream> OpenReadTaskAsync(System.Uri address) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 159public System.Threading.Tasks.Task<System.IO.Stream> OpenWriteTaskAsync(string address) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 160public System.Threading.Tasks.Task<System.IO.Stream> OpenWriteTaskAsync(string address, string? method) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 161public System.Threading.Tasks.Task<System.IO.Stream> OpenWriteTaskAsync(System.Uri address) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 162public System.Threading.Tasks.Task<System.IO.Stream> OpenWriteTaskAsync(System.Uri address, string? method) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 170public System.Threading.Tasks.Task<byte[]> UploadDataTaskAsync(string address, byte[] data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 171public System.Threading.Tasks.Task<byte[]> UploadDataTaskAsync(string address, string? method, byte[] data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 172public System.Threading.Tasks.Task<byte[]> UploadDataTaskAsync(System.Uri address, byte[] data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 173public System.Threading.Tasks.Task<byte[]> UploadDataTaskAsync(System.Uri address, string? method, byte[] data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 181public System.Threading.Tasks.Task<byte[]> UploadFileTaskAsync(string address, string fileName) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 182public System.Threading.Tasks.Task<byte[]> UploadFileTaskAsync(string address, string? method, string fileName) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 183public System.Threading.Tasks.Task<byte[]> UploadFileTaskAsync(System.Uri address, string fileName) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 184public System.Threading.Tasks.Task<byte[]> UploadFileTaskAsync(System.Uri address, string? method, string fileName) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 192public System.Threading.Tasks.Task<string> UploadStringTaskAsync(string address, string data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 193public System.Threading.Tasks.Task<string> UploadStringTaskAsync(string address, string? method, string data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 194public System.Threading.Tasks.Task<string> UploadStringTaskAsync(System.Uri address, string data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 195public System.Threading.Tasks.Task<string> UploadStringTaskAsync(System.Uri address, string? method, string data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 203public System.Threading.Tasks.Task<byte[]> UploadValuesTaskAsync(string address, System.Collections.Specialized.NameValueCollection data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 204public System.Threading.Tasks.Task<byte[]> UploadValuesTaskAsync(string address, string? method, System.Collections.Specialized.NameValueCollection data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 205public System.Threading.Tasks.Task<byte[]> UploadValuesTaskAsync(System.Uri address, System.Collections.Specialized.NameValueCollection data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); } 206public System.Threading.Tasks.Task<byte[]> UploadValuesTaskAsync(System.Uri address, string? method, System.Collections.Specialized.NameValueCollection data) { throw new System.PlatformNotSupportedException(System.SR.SystemNetWebClient_PlatformNotSupported); }
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)
406private static unsafe T Suspend<T>(Task<T> task, ConfigureAwaitOptions options) 548if (obj is Task<T> t) 665private static unsafe T TransparentSuspend<T>(Task<T> task) 723private static T TransparentAwait<T>(Task<T> task) 1324private static Task<T?> CreateRuntimeAsyncTask<T>(ref RuntimeAsyncAwaitState state) 1350private static Task<T?> TaskFromException<T>(Exception ex) 1352Task<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)
1111public static Task<string> ReadAllTextAsync(string path, CancellationToken cancellationToken = default) 1114public static Task<string> ReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken = default) 1123private static async Task<string> InternalReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken) 1196public static Task<byte[]> ReadAllBytesAsync(string path, CancellationToken cancellationToken = default) 1225private static async Task<byte[]> InternalReadAllBytesAsync(SafeFileHandle sfh, int count, CancellationToken cancellationToken) 1248private static async Task<byte[]> InternalReadAllBytesUnknownLengthAsync(SafeFileHandle sfh, CancellationToken cancellationToken) 1321public static Task<string[]> ReadAllLinesAsync(string path, CancellationToken cancellationToken = default) 1324public static Task<string[]> ReadAllLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken = default) 1333private 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)
127public 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)
239public 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)
129public 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) 602/// <summary>Gets the <see cref="Task{TResult}"/> for this builder.</summary> 603/// <returns>The <see cref="Task{TResult}"/> representing the builder's asynchronous operation.</returns> 604public Task<TResult> Task 616private Task<TResult> InitializeTaskAsPromise() 622internal static Task<TResult> CreateWeaklyTypedStateMachineBox() 638/// Completes the <see cref="Task{TResult}"/> in the 661internal static void SetExistingTaskResult(Task<TResult> task, TResult? result) 685/// Completes the <see cref="Task{TResult}"/> in the 693internal static void SetException(Exception exception, ref Task<TResult>? taskField) 701Task<TResult> task = (taskField ??= new Task<TResult>()); 742internal 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\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JSImports.g.cs (2)
828public static partial global::System.Threading.Tasks.Task<global::System.Runtime.InteropServices.JavaScript.JSObject> DynamicImport(string moduleName, string moduleUrl) 842global::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)
5891/// A <see cref="Task{DialogResult}"/> representing the outcome of the dialog. The task completes when the form is 5921public Task<DialogResult> ShowDialogAsync() => ShowDialogAsyncInternal(owner: null); 5931/// A <see cref="Task{DialogResult}"/> representing the outcome of the dialog. 5961public Task<DialogResult> ShowDialogAsync(IWin32Window owner) => ShowDialogAsyncInternal(owner); 5963private Task<DialogResult> ShowDialogAsyncInternal(IWin32Window? owner)
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
57private static async Task<Document> AddDesignerSerializationAttribute(
System.Windows.Forms.Analyzers.CodeFixes.VisualBasic (1)
AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.vb (1)
70cancellationToken As CancellationToken) As Task(Of Document)
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) 232var 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)
100internal static async Task<bool> RunServerShutdownRequestAsync( 178internal static Task<BuildResponse> RunServerBuildRequestAsync( 198internal static async Task<BuildResponse> RunServerBuildRequestAsync( 221static Task<NamedPipeClientStream?> tryConnectToServerAsync( 298static async Task<BuildResponse> tryRunRequestAsync( 321var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 392internal 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) 232var 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)
100internal static async Task<bool> RunServerShutdownRequestAsync( 178internal static Task<BuildResponse> RunServerBuildRequestAsync( 198internal static async Task<BuildResponse> RunServerBuildRequestAsync( 221static Task<NamedPipeClientStream?> tryConnectToServerAsync( 298static async Task<BuildResponse> tryRunRequestAsync( 321var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 392internal 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)
parent\vstest.console\Publisher\MetricsPublisherFactory.cs (1)
20public static async Task<IMetricsPublisher> GetMetricsPublisher(bool isTelemetryOptedIn, bool isDesignMode)
parent\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)