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>)
AppendChoices(IMessageActivity, String, IList<Choice>, ListStyle, ChoiceFactoryOptions, String, IList<String>, 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)

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

适用于