Jaa


Prompt<T>.OnPromptAsync Method

Definition

When overridden in a derived class, prompts the user for input.

protected abstract 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);
abstract member 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 MustOverride 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 is on the stack is prompting the user for input; otherwise, false. Determines whether Prompt or RetryPrompt should be used.

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