2 instantiations of InteractionResult
Aspire.Hosting (2)
IInteractionService.cs (2)
1151
return new
InteractionResult
<T>(result, canceled: false);
1166
return new
InteractionResult
<T>(data ?? default, canceled: true);
199 references to InteractionResult
Aspire.Hosting (53)
ApplicationModel\ResourceCommandService.cs (2)
458
var
progressResult = await interactionService.PromptProgressAsync(progressOptions.Message, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
710
var
result = await interactionService.PromptInputsAsync(
Ats\InteractionExports.cs (9)
63
var
result = await interactionService.PromptConfirmationAsync(title, message, options?.ToOptions(), cancellationToken).ConfigureAwait(false);
80
var
result = await interactionService.PromptMessageBoxAsync(title, message, options?.ToOptions(), cancellationToken).ConfigureAwait(false);
97
var
result = await interactionService.PromptNotificationAsync(title, message, options?.ToOptions(), cancellationToken).ConfigureAwait(false);
115
var
result = await interactionService.PromptProgressAsync(message, options?.ToOptions(), cancellationToken).ConfigureAwait(false);
136
var
result = await interactionService.PromptInputAsync(title, message, input.Input, options?.ToOptions(), cancellationToken).ConfigureAwait(false);
164
var
result = await interactionService.PromptInputsAsync(title, message, interactionInputs, options?.ToOptions(), cancellationToken).ConfigureAwait(false);
814
internal static BoolInteractionResult From(
InteractionResult
<bool> result)
840
internal static InputInteractionResult From(
InteractionResult
<InteractionInput> result)
872
internal static InputsInteractionResult From(
InteractionResult
<InteractionInputCollection> result)
IInteractionService.cs (23)
38
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the user confirmed, <c>false</c> otherwise.
40
Task<
InteractionResult
<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default);
50
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the user accepted, <c>false</c> otherwise.
52
Task<
InteractionResult
<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default);
64
/// An <see cref="
InteractionResult
{T}"/> containing the user's input.
66
Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
77
/// An <see cref="
InteractionResult
{T}"/> containing the user's input.
79
Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
90
/// An <see cref="
InteractionResult
{T}"/> containing the user's inputs as an <see cref="InteractionInputCollection"/>.
92
Task<
InteractionResult
<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
102
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the user accepted, <c>false</c> otherwise.
104
Task<
InteractionResult
<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default);
127
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the operation completed successfully,
131
Task<
InteractionResult
<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default);
141
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> when work or an explicit completion succeeds,
193
Task<
InteractionResult
<bool>> PromptTerminalAsync(string message, AspireTerminal terminal, TerminalInteractionOptions? options = null, CancellationToken cancellationToken = default);
1139
/// Provides a set of static methods for the <see cref="
InteractionResult
{T}"/>.
1144
/// Creates a new <see cref="
InteractionResult
{T}"/> with the specified result and a flag indicating that the interaction was not canceled.
1148
/// <returns>The new <see cref="
InteractionResult
{T}"/>.</returns>
1149
public static
InteractionResult
<T> Ok<T>(T result)
1155
/// Creates an <see cref="
InteractionResult
{T}"/> indicating a canceled interaction.
1161
/// An <see cref="
InteractionResult
{T}"/> with the <c>canceled</c> flag set to <see langword="true"/> and containing
1164
public static
InteractionResult
<T> Cancel<T>(T? data = default)
InteractionService.cs (12)
101
public async Task<
InteractionResult
<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
111
public async Task<
InteractionResult
<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
120
private async Task<
InteractionResult
<bool>> PromptMessageBoxCoreAsync(string title, string message, MessageBoxInteractionOptions options, CancellationToken cancellationToken)
149
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
154
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
156
var
result = await PromptInputsAsync(title, message, [input], options, cancellationToken).ConfigureAwait(false);
165
public async Task<
InteractionResult
<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
274
public async Task<
InteractionResult
<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default)
302
public async Task<
InteractionResult
<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default)
311
public async Task<
InteractionResult
<bool>> PromptTerminalAsync(string message, AspireTerminal terminal, TerminalInteractionOptions? options = null, CancellationToken cancellationToken = default)
341
private async Task<
InteractionResult
<bool>> PromptWorkAsync(
431
private static
InteractionResult
<bool> CreateWorkResult(InteractionCompletionState completion)
Orchestrator\ParameterProcessor.cs (4)
444
var
result = await interactionService.PromptInputsAsync(
503
var
result = await interactionService.PromptInputsAsync(
724
var
result = await interactionService.PromptNotificationAsync(
813
var
valuesPrompt = await interactionService.PromptInputsAsync(
Pipelines\DistributedApplicationPipeline.cs (1)
90
var
result = await interactionService.PromptNotificationAsync(
Publishing\ContainerRuntimeReadiness.cs (1)
46
var
result = await interactionService.PromptNotificationAsync(
VersionChecking\VersionCheckService.cs (1)
147
var
result = await _interactionService.PromptNotificationAsync(
Aspire.Hosting.Azure (11)
AzureEnvironmentResource.cs (1)
355
var
result = await interactionService.PromptNotificationAsync(
AzureProvisioningController.cs (2)
695
var
result = await interactionService.PromptInputsAsync(
1712
var
notificationResult = await interactionService.PromptNotificationAsync(
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (7)
117
var
result = await _interactionService.PromptInputsAsync(
185
var
result = await _interactionService.PromptInputsAsync(
211
var
manualResult = await _interactionService.PromptInputsAsync(
284
var
result = await _interactionService.PromptInputsAsync(
310
var
manualResult = await _interactionService.PromptInputsAsync(
395
var
resourceGroupResult = await _interactionService.PromptInputsAsync(
476
var
locationResult = await _interactionService.PromptInputsAsync(
Provisioning\Internal\RunModeProvisioningContextProvider.cs (1)
290
var
result = await _interactionService.PromptInputsAsync(
Aspire.Hosting.Azure.Tests (15)
tests\Shared\TestInteractionService.cs (15)
33
public Task<
InteractionResult
<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
38
public Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
43
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
47
var
result = (
InteractionResult
<InteractionInput>)await data.CompletionTcs.Task;
51
public async Task<
InteractionResult
<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
55
var
result = (
InteractionResult
<InteractionInputCollection>)await data.CompletionTcs.Task;
66
public async Task<
InteractionResult
<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default)
70
return (
InteractionResult
<bool>)await data.CompletionTcs.Task;
73
public async Task<
InteractionResult
<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
77
return (
InteractionResult
<bool>)await data.CompletionTcs.Task;
82
public async Task<
InteractionResult
<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default)
92
public Task<
InteractionResult
<bool>> PromptTerminalAsync(string message, AspireTerminal terminal, TerminalInteractionOptions? options = null, CancellationToken cancellationToken = default)
100
private async Task<
InteractionResult
<bool>> PromptWorkAsync(
Aspire.Hosting.Browsers.Tests (15)
tests\Shared\TestInteractionService.cs (15)
33
public Task<
InteractionResult
<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
38
public Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
43
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
47
var
result = (
InteractionResult
<InteractionInput>)await data.CompletionTcs.Task;
51
public async Task<
InteractionResult
<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
55
var
result = (
InteractionResult
<InteractionInputCollection>)await data.CompletionTcs.Task;
66
public async Task<
InteractionResult
<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default)
70
return (
InteractionResult
<bool>)await data.CompletionTcs.Task;
73
public async Task<
InteractionResult
<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
77
return (
InteractionResult
<bool>)await data.CompletionTcs.Task;
82
public async Task<
InteractionResult
<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default)
92
public Task<
InteractionResult
<bool>> PromptTerminalAsync(string message, AspireTerminal terminal, TerminalInteractionOptions? options = null, CancellationToken cancellationToken = default)
100
private async Task<
InteractionResult
<bool>> PromptWorkAsync(
Aspire.Hosting.DevTunnels (1)
DevTunnelLoginManager.cs (1)
56
var
result = await _interactionService.PromptNotificationAsync(
Aspire.Hosting.DevTunnels.Tests (15)
tests\Shared\TestInteractionService.cs (15)
33
public Task<
InteractionResult
<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
38
public Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
43
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
47
var
result = (
InteractionResult
<InteractionInput>)await data.CompletionTcs.Task;
51
public async Task<
InteractionResult
<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
55
var
result = (
InteractionResult
<InteractionInputCollection>)await data.CompletionTcs.Task;
66
public async Task<
InteractionResult
<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default)
70
return (
InteractionResult
<bool>)await data.CompletionTcs.Task;
73
public async Task<
InteractionResult
<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
77
return (
InteractionResult
<bool>)await data.CompletionTcs.Task;
82
public async Task<
InteractionResult
<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default)
92
public Task<
InteractionResult
<bool>> PromptTerminalAsync(string message, AspireTerminal terminal, TerminalInteractionOptions? options = null, CancellationToken cancellationToken = default)
100
private async Task<
InteractionResult
<bool>> PromptWorkAsync(
Aspire.Hosting.Docker (1)
DockerComposeEnvironmentResource.cs (1)
529
var
result = await interactionService.PromptNotificationAsync(
Aspire.Hosting.Kubernetes (1)
Deployment\HelmDeploymentEngine.cs (1)
681
var
result = await interactionService.PromptNotificationAsync(
Aspire.Hosting.RemoteHost.Tests (15)
tests\Shared\TestInteractionService.cs (15)
33
public Task<
InteractionResult
<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
38
public Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
43
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
47
var
result = (
InteractionResult
<InteractionInput>)await data.CompletionTcs.Task;
51
public async Task<
InteractionResult
<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
55
var
result = (
InteractionResult
<InteractionInputCollection>)await data.CompletionTcs.Task;
66
public async Task<
InteractionResult
<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default)
70
return (
InteractionResult
<bool>)await data.CompletionTcs.Task;
73
public async Task<
InteractionResult
<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
77
return (
InteractionResult
<bool>)await data.CompletionTcs.Task;
82
public async Task<
InteractionResult
<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default)
92
public Task<
InteractionResult
<bool>> PromptTerminalAsync(string message, AspireTerminal terminal, TerminalInteractionOptions? options = null, CancellationToken cancellationToken = default)
100
private async Task<
InteractionResult
<bool>> PromptWorkAsync(
Aspire.Hosting.Tests (45)
Dashboard\DashboardServiceTests.cs (4)
665
var
promptResult = await prompt.DefaultTimeout();
789
var
result = await resultTask.DefaultTimeout();
1260
var
result = await resultTask;
1301
var
result = await resultTask;
InteractionServiceTests.cs (19)
37
var
result = await resultTask.DefaultTimeout();
62
var
result = await resultTask.DefaultTimeout();
101
var
result1 = await resultTask1.DefaultTimeout();
109
var
result2 = await resultTask2.DefaultTimeout();
115
var
result3 = await resultTask3.DefaultTimeout();
560
var
result = await resultTask.DefaultTimeout();
978
var
result = await resultTask.DefaultTimeout();
1160
var
result = await resultTask.DefaultTimeout();
1239
var
result = await interactionService.PromptProgressAsync("Please wait", new ProgressInteractionOptions
1280
var
result = await resultTask.DefaultTimeout();
1316
var
result = await resultTask.DefaultTimeout();
1350
var
result = await resultTask.DefaultTimeout();
1370
var
result = await resultTask.DefaultTimeout();
1391
var
result = await resultTask.DefaultTimeout();
1469
var
result = await resultTask;
1497
var
result = await resultTask;
1517
var
result = await resultTask;
1540
var
result = await resultTask;
1564
var
result = await resultTask;
Publishing\PipelineActivityReporterTests.cs (5)
582
var
promptResult = await promptTask.DefaultTimeout();
611
var
promptResult = await promptTask.DefaultTimeout();
640
var
promptResult = await promptTask.DefaultTimeout();
671
var
result = await promptTask.DefaultTimeout();
744
var
notificationResult = await notificationTask.DefaultTimeout();
Terminals\InteractionServiceTerminalTests.cs (2)
123
var
result = await prompt.DefaultTimeout();
172
var
result = await prompt.DefaultTimeout();
tests\Shared\TestInteractionService.cs (15)
33
public Task<
InteractionResult
<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
38
public Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
43
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
47
var
result = (
InteractionResult
<InteractionInput>)await data.CompletionTcs.Task;
51
public async Task<
InteractionResult
<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
55
var
result = (
InteractionResult
<InteractionInputCollection>)await data.CompletionTcs.Task;
66
public async Task<
InteractionResult
<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default)
70
return (
InteractionResult
<bool>)await data.CompletionTcs.Task;
73
public async Task<
InteractionResult
<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
77
return (
InteractionResult
<bool>)await data.CompletionTcs.Task;
82
public async Task<
InteractionResult
<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default)
92
public Task<
InteractionResult
<bool>> PromptTerminalAsync(string message, AspireTerminal terminal, TerminalInteractionOptions? options = null, CancellationToken cancellationToken = default)
100
private async Task<
InteractionResult
<bool>> PromptWorkAsync(
Publishers.AppHost (7)
DistributedApplicationBuilderExtensions.cs (7)
40
var
multiInputResult = await interactionService.PromptInputsAsync(
143
var
envResult = await interactionService.PromptInputAsync(
166
var
dbPasswordResult = await interactionService.PromptInputAsync(
181
var
regionResult = await interactionService.PromptInputAsync(
202
var
enableLoggingResult = await interactionService.PromptInputAsync(
216
var
instanceCountResult = await interactionService.PromptInputAsync(
231
var
deployModeResult = await interactionService.PromptInputAsync(
Stress.AppHost (16)
InteractionCommands.cs (16)
124
var
result = await interactionService.PromptInputAsync(
184
var
result = await interactionService.PromptInputsAsync(
262
var
result = await interactionService.PromptInputsAsync(
367
var
result = await interactionService.PromptInputsAsync(
486
var
result = await interactionService.PromptInputsAsync(
586
var
result = await interactionService.PromptInputsAsync(
675
var
result = await interactionService.PromptInputsAsync(
846
var
result = await interactionService.PromptInputsAsync(
896
var
result = await interactionService.PromptProgressAsync(
925
var
result = await interactionService.PromptProgressAsync(
976
var
result = await interactionService.PromptProgressAsync(
999
var
result = await interactionService.PromptProgressAsync(
1022
var
result = await interactionService.PromptProgressAsync(
1047
var
result = await interactionService.PromptProgressAsync(
1097
var
result = await interactionService.PromptInputAsync(
1143
var
result = await interactionService.PromptInputAsync(
Terminals.AppHost (4)
TerminalInteractionCommands.cs (4)
63
var
result = await interactionService.PromptTerminalAsync(
142
var
result = await interactionService.PromptTerminalAsync(
293
var
limitResult = await interactionService.PromptInputsAsync(
335
var
result = await interactionService.PromptTerminalAsync(