語言

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)。

建構函式

名稱 Description
FormDialog<T>(T, BuildFormDelegate<T>, FormOptions, IEnumerable<EntityRecommendation>, CultureInfo)

用於建立 FormFlow 對話框的建構器。

方法

名稱 Description
MessageReceived(IDialogContext, IAwaitable<IMessageActivity>)

填寫你所在州的表格對話框。

明確介面實作

名稱 Description
IDialog<T>.StartAsync(IDialogContext)

填寫你所在州的表格對話框。

IFormDialog<T>.Form

填寫你所在州的表格對話框。

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

填寫你所在州的表格對話框。

擴充方法

名稱 Description
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>)

呼叫 voided IDialog<TResult>,忽略結果,然後重新開始原本的對話框等待。

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

呼叫 voided 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 迴圈的 a。

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

用可得分物裝飾對話,讓該可得分者能參與對話堆疊。

適用於