2 instantiations of InteractionResult
Aspire.Hosting (2)
IInteractionService.cs (2)
1136
return new
InteractionResult
<T>(result, canceled: false);
1151
return new
InteractionResult
<T>(data ?? default, canceled: true);
198 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)
33
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the user confirmed, <c>false</c> otherwise.
35
Task<
InteractionResult
<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default);
45
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the user accepted, <c>false</c> otherwise.
47
Task<
InteractionResult
<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default);
59
/// An <see cref="
InteractionResult
{T}"/> containing the user's input.
61
Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
72
/// An <see cref="
InteractionResult
{T}"/> containing the user's input.
74
Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
85
/// An <see cref="
InteractionResult
{T}"/> containing the user's inputs as an <see cref="InteractionInputCollection"/>.
87
Task<
InteractionResult
<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
97
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the user accepted, <c>false</c> otherwise.
99
Task<
InteractionResult
<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default);
122
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the operation completed successfully,
126
Task<
InteractionResult
<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default);
136
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> when work or an explicit completion succeeds,
188
Task<
InteractionResult
<bool>> PromptTerminalAsync(string message, AspireTerminal terminal, TerminalInteractionOptions? options = null, CancellationToken cancellationToken = default);
1124
/// Provides a set of static methods for the <see cref="
InteractionResult
{T}"/>.
1129
/// Creates a new <see cref="
InteractionResult
{T}"/> with the specified result and a flag indicating that the interaction was not canceled.
1133
/// <returns>The new <see cref="
InteractionResult
{T}"/>.</returns>
1134
public static
InteractionResult
<T> Ok<T>(T result)
1140
/// Creates an <see cref="
InteractionResult
{T}"/> indicating a canceled interaction.
1146
/// An <see cref="
InteractionResult
{T}"/> with the <c>canceled</c> flag set to <see langword="true"/> and containing
1149
public static
InteractionResult
<T> Cancel<T>(T? data = default)
InteractionService.cs (12)
94
public async Task<
InteractionResult
<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
104
public async Task<
InteractionResult
<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
113
private async Task<
InteractionResult
<bool>> PromptMessageBoxCoreAsync(string title, string message, MessageBoxInteractionOptions options, CancellationToken cancellationToken)
142
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
147
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
149
var
result = await PromptInputsAsync(title, message, [input], options, cancellationToken).ConfigureAwait(false);
158
public async Task<
InteractionResult
<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
267
public async Task<
InteractionResult
<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default)
295
public async Task<
InteractionResult
<bool>> PromptProgressAsync(string message, ProgressInteractionOptions? options = null, CancellationToken cancellationToken = default)
304
public async Task<
InteractionResult
<bool>> PromptTerminalAsync(string message, AspireTerminal terminal, TerminalInteractionOptions? options = null, CancellationToken cancellationToken = default)
334
private async Task<
InteractionResult
<bool>> PromptWorkAsync(
424
private static
InteractionResult
<bool> CreateWorkResult(InteractionCompletionState completion)
Orchestrator\ParameterProcessor.cs (4)
350
var
result = await interactionService.PromptInputsAsync(
389
var
result = await interactionService.PromptInputsAsync(
560
var
result = await interactionService.PromptNotificationAsync(
611
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 (10)
AzureEnvironmentResource.cs (1)
333
var
result = await interactionService.PromptNotificationAsync(
AzureProvisioningController.cs (2)
669
var
result = await interactionService.PromptInputsAsync(
1664
var
notificationResult = await interactionService.PromptNotificationAsync(
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (6)
151
var
result = await _interactionService.PromptInputsAsync(
177
var
manualResult = await _interactionService.PromptInputsAsync(
250
var
result = await _interactionService.PromptInputsAsync(
276
var
manualResult = await _interactionService.PromptInputsAsync(
361
var
resourceGroupResult = await _interactionService.PromptInputsAsync(
442
var
locationResult = await _interactionService.PromptInputsAsync(
Provisioning\Internal\RunModeProvisioningContextProvider.cs (1)
277
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)
523
var
result = await interactionService.PromptNotificationAsync(
Aspire.Hosting.Kubernetes (1)
Deployment\HelmDeploymentEngine.cs (1)
682
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)
626
var
promptResult = await prompt.DefaultTimeout();
749
var
result = await resultTask.DefaultTimeout();
1217
var
result = await resultTask;
1257
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();
456
var
result = await resultTask.DefaultTimeout();
874
var
result = await resultTask.DefaultTimeout();
1056
var
result = await resultTask.DefaultTimeout();
1135
var
result = await interactionService.PromptProgressAsync("Please wait", new ProgressInteractionOptions
1176
var
result = await resultTask.DefaultTimeout();
1212
var
result = await resultTask.DefaultTimeout();
1246
var
result = await resultTask.DefaultTimeout();
1266
var
result = await resultTask.DefaultTimeout();
1287
var
result = await resultTask.DefaultTimeout();
1364
var
result = await resultTask;
1392
var
result = await resultTask;
1412
var
result = await resultTask;
1435
var
result = await resultTask;
1459
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)
108
var
result = await interactionService.PromptInputAsync(
168
var
result = await interactionService.PromptInputsAsync(
246
var
result = await interactionService.PromptInputsAsync(
351
var
result = await interactionService.PromptInputsAsync(
470
var
result = await interactionService.PromptInputsAsync(
570
var
result = await interactionService.PromptInputsAsync(
659
var
result = await interactionService.PromptInputsAsync(
830
var
result = await interactionService.PromptInputsAsync(
880
var
result = await interactionService.PromptProgressAsync(
909
var
result = await interactionService.PromptProgressAsync(
960
var
result = await interactionService.PromptProgressAsync(
983
var
result = await interactionService.PromptProgressAsync(
1006
var
result = await interactionService.PromptProgressAsync(
1031
var
result = await interactionService.PromptProgressAsync(
1081
var
result = await interactionService.PromptInputAsync(
1127
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(