NumberPrompt<T> 类

定义

提示用户输入数字。

public class NumberPrompt<T> : Microsoft.Bot.Builder.Dialogs.Prompt<T> where T : struct
type NumberPrompt<'T (requires 'T : struct)> = class
    inherit Prompt<'T (requires 'T : struct)>
Public Class NumberPrompt(Of T)
Inherits Prompt(Of T)

类型参数

T

所需的输入类型。

继承
NumberPrompt<T>

注解

数字提示当前支持以下类型:SingleInt32Int64DoubleDecimal

构造函数

NumberPrompt<T>(String, PromptValidator<T>, String)

初始化 NumberPrompt<T> 类的新实例。

属性

DefaultLocale

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

Id

获取或设置对话框的 ID。

(继承自 Dialog)
Source

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

(继承自 Dialog)
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)

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

适用于