CommandDialog<T>.On<U> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Define a handler that is fired on a regular expression match of a message.
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)
Type Parameters
- U
Type of input to result handler.
Parameters
- expression
- Regex
Regular expression to match.
- handler
- ResumeAfter<IMessageActivity>
Handler to call on match.
- resultHandler
- ResumeAfter<U>
Optional result handler to be called if handler is creating a chaild dialog.
Returns
A commandDialog.