IInteractionService.PromptNotificationAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prompts the user with a notification.
public System.Threading.Tasks.Task<Aspire.Hosting.InteractionResult<bool>> PromptNotificationAsync(string title, string message, Aspire.Hosting.NotificationInteractionOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member PromptNotificationAsync : string * string * Aspire.Hosting.NotificationInteractionOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.InteractionResult<bool>>
Public Function PromptNotificationAsync (title As String, message As String, Optional options As NotificationInteractionOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of InteractionResult(Of Boolean))
Parameters
- title
- String
The title of the notification.
- message
- String
The message to display in the notification.
- options
- NotificationInteractionOptions
Optional configuration for the notification interaction.
- cancellationToken
- CancellationToken
A token to cancel the operation.
Returns
An InteractionResult<T> containing true if the user accepted, false otherwise.