语言

FormDialog<T> 类

定义

填写表格对话框,填写您所在州的表格。

[System.Serializable]
public sealed class FormDialog<T> : Microsoft.Bot.Builder.Dialogs.IDialog<T>, Microsoft.Bot.Builder.FormFlow.IFormDialog<T>, System.Runtime.Serialization.ISerializable where T : class
[<System.Serializable>]
type FormDialog<'T (requires 'T : null)> = class
    interface IFormDialog<'T (requires 'T : null)>
    interface IDialog<'T (requires 'T : null)>
    interface ISerializable
Public NotInheritable Class FormDialog(Of T)
Implements IDialog(Of T), IFormDialog(Of T), ISerializable

类型参数

T

那种需要填补的类型。

继承
FormDialog<T>
属性
实现

注解

这是管理 FormFlow 对话框的根类。 它通常通过工厂方法FromForm<T>(BuildFormDelegate<T>, FormOptions)FromType<T>(FormOptions)或 。

构造函数

名称 说明
FormDialog<T>(T, BuildFormDelegate<T>, FormOptions, IEnumerable<EntityRecommendation>, CultureInfo)

用于创建 FormFlow 对话框的构造器。

方法

名称 说明
MessageReceived(IDialogContext, IAwaitable<IMessageActivity>)

填写表格对话框,填写您所在州的表格。

显式接口实现

名称 说明
IDialog<T>.StartAsync(IDialogContext)

填写表格对话框,填写您所在州的表格。

IFormDialog<T>.Form

填写表格对话框,填写您所在州的表格。

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

填写表格对话框,填写您所在州的表格。

扩展方法

名称 说明
Catch<T,E>(IDialog<T>, Func<IDialog<T>,E,IDialog<T>>)

当前件 IDialog<TResult> 完成后,捕捉并处理类型 E为 的异常。

Catch<T>(IDialog<T>, Func<IDialog<T>,Exception,IDialog<T>>)

当前件 IDialog<TResult> 完成后,捕捉并处理任何异常。

ContinueWith<T,R>(IDialog<T>, Chain.Continuation<T,R>)

当前件 IDialog<TResult> 完成后,执行延续以产生下一个 IDialog<TResult>。

DefaultIfException<T,E>(IDialog<T>)

当前件 IDialog<TResult> 完成后,停止对异常 E的传播。

DefaultIfException<T>(IDialog<T>)

当前件 IDialog<TResult> 完成后,停止异常的传播。

Do<T>(IDialog<T>, Func<IBotContext,IAwaitable<T>,Task>)

完成后 IDialog<TResult> 执行一个副作用。

Loop<T>(IDialog<T>)

永远循环 IDialog<TResult> 。

PostEvent<T,E>(IDialog<T>, E)

当前件 IDialog<TResult> 完成后,将该物品发布到事件队列中。

PostToUser<T>(IDialog<T>)

将 . 的结果发布给用户 IDialog<TResult>。

Select<T,R>(IDialog<T>, Func<T,R>)

当前件 IDialog<TResult> 完成后,将结果投影为新的 IDialog<TResult>。

SelectMany<T,C,R>(IDialog<T>, Func<T,IDialog<C>>, Func<T,C,R>)

当前件 IDialog<TResult> 完成后,执行下一个 IDialog<TResult>,并用投影将结果合并。

Switch<T,R>(IDialog<T>, ICase<T,R>[])

当前件IDialog<TResult>完成后,逐一运行ICase<T,R>ContextualSelector<T,R>第一个前件对话返回值满足的“ICase<T,R>。

Then<T,R>(IDialog<T>, Func<IBotContext,IAwaitable<T>,Task<R>>)

完成后 IDialog<TResult> 执行一个动作。

Void<T,R>(IDialog<T>)

调用虚 IDialog<TResult>无,忽略结果,然后重新开始原始对话等待。

Void<T>(IDialog<T>, IDialogStack)

调用虚 IDialog<TResult>无,忽略结果,然后重新开始原始对话等待。

WaitToBot<T>(IDialog<T>)

在前件完成后,将消息发送到链条上。

Where<T>(IDialog<T>, Func<T,Boolean>)

当前件 IDialog<TResult> 完成后,评估谓词并决定是否继续。

While<T>(IDialog<T>, Func<T,IDialog<Boolean>>, Func<T,IDialog<T>>)

创建一个 IDialog<TResult> 表示“while”循环的

WithScorable<T,Item,Score>(IDialog<T>, IScorable<Item,Score>)

用可得分物品装饰对话,使可得分者能参与对话栈。

适用于