Share via


ActivityPrompt.OnPromptAsync 方法

定义

重载

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

在派生类中重写时,会提示用户输入。

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

在派生类中重写时,会提示用户输入。

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

在派生类中重写时,会提示用户输入。

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

参数

turnContext
ITurnContext

与用户当前轮次对话的上下文。

state
IDictionary<String,Object>

包含对话框堆栈上提示的当前实例的状态。

options
PromptOptions

根据对 的调用 PromptAsync(String, PromptOptions, CancellationToken)中最初提供的选项构造的提示选项对象。

cancellationToken
CancellationToken

可由其他对象或线程用以接收取消通知的取消标记。

返回

表示异步操作的 Task

适用于

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

在派生类中重写时,会提示用户输入。

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

参数

turnContext
ITurnContext

与用户当前轮次对话的上下文。

state
IDictionary<String,Object>

包含对话框堆栈上提示的当前实例的状态。

options
PromptOptions

根据对 的调用 PromptAsync(String, PromptOptions, CancellationToken)中最初提供的选项构造的提示选项对象。

isRetry
Boolean

一个 Boolean ,表示提示是否为重试。

cancellationToken
CancellationToken

可由其他对象或线程用以接收取消通知的取消标记。

返回

一个 Task ,表示异步操作的结果。

适用于