Share via


DialogContext.PromptAsync(String, PromptOptions, CancellationToken) Method

Definition

Helper function to simplify formatting the options for calling a prompt dialog. This helper will take an options argument and then call BeginDialogAsync(String, Object, CancellationToken).

public System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult> PromptAsync (string dialogId, Microsoft.Bot.Builder.Dialogs.PromptOptions options, System.Threading.CancellationToken cancellationToken = default);
member this.PromptAsync : string * Microsoft.Bot.Builder.Dialogs.PromptOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult>
Public Function PromptAsync (dialogId As String, options As PromptOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DialogTurnResult)

Parameters

dialogId
String

ID of the prompt dialog to start.

options
PromptOptions

Information to pass to the prompt dialog being started.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

A task that represents the work queued to execute.

Remarks

If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog.

Applies to

See also