Share via


IInteractionService.PromptConfirmationAsync Method

Definition

Prompts the user for confirmation with a dialog.

public System.Threading.Tasks.Task<Aspire.Hosting.InteractionResult<bool>> PromptConfirmationAsync(string title, string message, Aspire.Hosting.MessageBoxInteractionOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member PromptConfirmationAsync : string * string * Aspire.Hosting.MessageBoxInteractionOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.InteractionResult<bool>>
Public Function PromptConfirmationAsync (title As String, message As String, Optional options As MessageBoxInteractionOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of InteractionResult(Of Boolean))

Parameters

title
String

The title of the dialog.

message
String

The message to display in the dialog.

options
MessageBoxInteractionOptions

Optional configuration for the message box interaction.

cancellationToken
CancellationToken

A token to cancel the operation.

Returns

An InteractionResult<T> containing true if the user confirmed, false otherwise.

Applies to