ChoicePrompt 类

定义

提示用户从选项列表中进行选择。

public class ChoicePrompt : Microsoft.Bot.Builder.Dialogs.Prompt<Microsoft.Bot.Builder.Dialogs.Choices.FoundChoice>
type ChoicePrompt = class
    inherit Prompt<FoundChoice>
Public Class ChoicePrompt
Inherits Prompt(Of FoundChoice)
继承

构造函数

ChoicePrompt(String, Dictionary<String,ChoiceFactoryOptions>, PromptValidator<FoundChoice>, String)

初始化 ChoicePrompt 类的新实例。

ChoicePrompt(String, PromptValidator<FoundChoice>, String)

初始化 ChoicePrompt 类的新实例。

属性

ChoiceOptions

获取或设置传递给 ChoiceFactory 并用于调整呈现给用户的选项样式的其他选项。

DefaultLocale

获取或设置用于确定提示的语言特定行为的默认区域设置。

Id

获取或设置对话框的 ID。

(继承自 Dialog)
RecognizerOptions

获取或设置传递给基础 RecognizeChoices(String, IList<Choice>, FindChoicesOptions) 方法的其他选项。

Source

获取 cref=“SourceRange”/>的信息。

(继承自 Dialog)
Style

获取或设置向用户显示提示时要使用的样式。

TelemetryClient

获取或设置 IBotTelemetryClient 用于日志记录的 。

(继承自 Dialog)

方法

AppendChoices(IMessageActivity, String, IList<Choice>, ListStyle, ChoiceFactoryOptions, CancellationToken)

在派生类中重写时,在提示用户输入时,将选项追加到活动。

(继承自 Prompt<T>)
BeginDialogAsync(DialogContext, Object, CancellationToken)

在将提示对话推送到对话堆栈并激活时调用。

(继承自 Prompt<T>)
ContinueDialogAsync(DialogContext, CancellationToken)

当提示对话为活动对话且用户使用新活动进行答复时调用。

(继承自 Prompt<T>)
EndDialogAsync(ITurnContext, DialogInstance, DialogReason, CancellationToken)

在对话结束时调用。

(继承自 Dialog)
GetVersion()

获取表示此对话框版本的唯一字符串。 如果版本在轮次之间更改,对话系统将发出 DialogChanged 事件。

(继承自 Dialog)
OnComputeId()

生成对话框的计算 ID。

(继承自 Dialog)
OnDialogEventAsync(DialogContext, DialogEvent, CancellationToken)

当当前对话或当前对话启动的对话使用 DialogContext.emitEvent()引发事件时调用。

(继承自 Dialog)
OnPostBubbleEventAsync(DialogContext, DialogEvent, CancellationToken)

在事件浮升到所有父级且未处理之后调用。

(继承自 Dialog)
OnPreBubbleEventAsync(DialogContext, DialogEvent, CancellationToken)

在事件浮升到其父级之前调用。

(继承自 Prompt<T>)
OnPromptAsync(ITurnContext, IDictionary<String,Object>, PromptOptions, Boolean, CancellationToken)

提示用户输入。

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

尝试识别用户的输入。

RegisterSourceLocation(String, Int32)

在提供的位置注册 cref=“SourceRange”/> 。

(继承自 Dialog)
RepromptDialogAsync(ITurnContext, DialogInstance, CancellationToken)

在请求提示对话框以重新提示用户输入时调用。

(继承自 Prompt<T>)
ResumeDialogAsync(DialogContext, DialogReason, Object, CancellationToken)

当提示对话恢复为对话堆栈上的活动对话时调用,例如当堆栈上的上一个活动对话完成时调用。

(继承自 Prompt<T>)

扩展方法

RunAsync(Dialog, ITurnContext, IStatePropertyAccessor<DialogState>, CancellationToken)

创建对话堆栈并启动对话,将其推送到堆栈上。

适用于