語言

CommandDialog<T>.On<U> 方法

定義

定義一個處理程序,該處理器會在訊息的正則表達式匹配時觸發。

public Microsoft.Bot.Builder.Dialogs.CommandDialog<T> On<U>(System.Text.RegularExpressions.Regex expression, Microsoft.Bot.Builder.Dialogs.ResumeAfter<Microsoft.Bot.Connector.IMessageActivity> handler, Microsoft.Bot.Builder.Dialogs.ResumeAfter<U> resultHandler = default);
member this.On : System.Text.RegularExpressions.Regex * Microsoft.Bot.Builder.Dialogs.ResumeAfter<Microsoft.Bot.Connector.IMessageActivity> * Microsoft.Bot.Builder.Dialogs.ResumeAfter<'U> -> Microsoft.Bot.Builder.Dialogs.CommandDialog<'T>
Public Function On(Of U) (expression As Regex, handler As ResumeAfter(Of IMessageActivity), Optional resultHandler As ResumeAfter(Of U) = Nothing) As CommandDialog(Of T)

類型參數

U

輸入類型與結果處理程序。

參數

expression
Regex

用正則表達式來對應。

handler
ResumeAfter<IMessageActivity>

配對時要叫指揮官。

resultHandler
ResumeAfter<U>

若處理器建立 chaild 對話框,則可呼叫的可選結果處理器。

傳回

一個 commandDialog。

適用於