ActivityPrompt.OnPromptAsync Method

Definition

Overloads

OnPromptAsync(ITurnContext, IDictionary<String,Object>, PromptOptions, CancellationToken)

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

OnPromptAsync(ITurnContext, IDictionary<String,Object>, PromptOptions, Boolean, CancellationToken)

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

OnPromptAsync(ITurnContext, IDictionary<String,Object>, PromptOptions, CancellationToken)

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

protected virtual System.Threading.Tasks.Task OnPromptAsync (Microsoft.Bot.Builder.ITurnContext turnContext, System.Collections.Generic.IDictionary<string,object> state, Microsoft.Bot.Builder.Dialogs.PromptOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member OnPromptAsync : Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.IDictionary<string, obj> * Microsoft.Bot.Builder.Dialogs.PromptOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnPromptAsync : Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.IDictionary<string, obj> * Microsoft.Bot.Builder.Dialogs.PromptOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function OnPromptAsync (turnContext As ITurnContext, state As IDictionary(Of String, Object), options As PromptOptions, 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).

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

OnPromptAsync(ITurnContext, IDictionary<String,Object>, PromptOptions, Boolean, CancellationToken)

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

protected virtual 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
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 Overridable 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

A Boolean representing if the prompt is a retry.

cancellationToken
CancellationToken

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

Returns

A Task representing the result of the asynchronous operation.

Applies to