TextPrompt.OnPromptAsync Method

Definition

Prompts the user for input.

protected override System.Threading.Tasks.Task OnPromptAsync (Microsoft.Bot.Builder.ITurnContext turnContext, System.Collections.Generic.IDictionary<string,object> state, Microsoft.Bot.Builder.Dialogs.PromptOptions options, bool isRetry, System.Threading.CancellationToken cancellationToken = default);
override this.OnPromptAsync : Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.IDictionary<string, obj> * Microsoft.Bot.Builder.Dialogs.PromptOptions * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overrides Function OnPromptAsync (turnContext As ITurnContext, state As IDictionary(Of String, Object), options As PromptOptions, isRetry As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

turnContext
ITurnContext

Context for the current turn of conversation with the user.

state
IDictionary<String,Object>

Contains state for the current instance of the prompt on the dialog stack.

options
PromptOptions

A prompt options object constructed from the options initially provided in the call to PromptAsync(String, PromptOptions, CancellationToken).

isRetry
Boolean

true if this is the first time this prompt dialog instance on the stack is prompting the user for input; otherwise, false.

cancellationToken
CancellationToken

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

Returns

A Task representing the asynchronous operation.

Applies to