2 instantiations of InteractionResult
Aspire.Hosting (2)
ApplicationModel\InteractionService.cs (2)
330
return new
InteractionResult
<T>(result, canceled: false);
335
return new
InteractionResult
<T>(data ?? default, canceled: true);
20 references to InteractionResult
Aspire.Hosting (16)
ApplicationModel\InteractionService.cs (16)
42
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the user confirmed, <c>false</c> otherwise.
44
public async Task<
InteractionResult
<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
62
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the user accepted, <c>false</c> otherwise.
64
public async Task<
InteractionResult
<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
73
private async Task<
InteractionResult
<bool>> PromptMessageBoxCoreAsync(string title, string message, MessageBoxInteractionOptions options, CancellationToken cancellationToken)
101
/// An <see cref="
InteractionResult
{T}"/> containing the user's input.
103
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
117
/// An <see cref="
InteractionResult
{T}"/> containing the user's input.
119
public async Task<
InteractionResult
<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
121
var
result = await PromptInputsAsync(title, message, [input], options, cancellationToken).ConfigureAwait(false);
139
/// An <see cref="
InteractionResult
{T}"/> containing the user's inputs.
141
public async Task<
InteractionResult
<IReadOnlyList<InteractionInput>>> PromptInputsAsync(string title, string? message, IEnumerable<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
167
/// An <see cref="
InteractionResult
{T}"/> containing <c>true</c> if the user accepted, <c>false</c> otherwise.
169
public async Task<
InteractionResult
<bool>> PromptMessageBarAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
328
internal static
InteractionResult
<T> Ok<T>(T result)
333
internal static
InteractionResult
<T> Cancel<T>(T? data = default)
Aspire.Hosting.Tests (2)
InteractionServiceTests.cs (2)
32
var
result = await resultTask.DefaultTimeout();
57
var
result = await resultTask.DefaultTimeout();
Stress.AppHost (2)
Program.cs (2)
168
var
result = await interactionService.PromptInputAsync(
217
var
result = await interactionService.PromptInputsAsync("Input request", "Provide your name", inputs, cancellationToken: commandContext.CancellationToken);