MessageExtensions<TState>.OnSubmitAction 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.
Overloads
| OnSubmitAction(MultipleRouteSelector, SubmitActionHandlerAsync<TState>) |
Registers a handler that implements the submit action for an Action based Message Extension. |
| OnSubmitAction(RouteSelectorAsync, SubmitActionHandlerAsync<TState>) |
Registers a handler that implements the submit action for an Action based Message Extension. |
| OnSubmitAction(String, SubmitActionHandlerAsync<TState>) |
Registers a handler that implements the submit action for an Action based Message Extension. |
| OnSubmitAction(Regex, SubmitActionHandlerAsync<TState>) |
Registers a handler that implements the submit action for an Action based Message Extension. |
OnSubmitAction(MultipleRouteSelector, SubmitActionHandlerAsync<TState>)
Registers a handler that implements the submit action for an Action based Message Extension.
public Microsoft.Teams.AI.Application<TState> OnSubmitAction(Microsoft.Teams.AI.MultipleRouteSelector routeSelectors, Microsoft.Teams.AI.SubmitActionHandlerAsync<TState> handler);
member this.OnSubmitAction : Microsoft.Teams.AI.MultipleRouteSelector * Microsoft.Teams.AI.SubmitActionHandlerAsync<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))> -> Microsoft.Teams.AI.Application<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))>
Public Function OnSubmitAction (routeSelectors As MultipleRouteSelector, handler As SubmitActionHandlerAsync(Of TState)) As Application(Of TState)
Parameters
- routeSelectors
- MultipleRouteSelector
Combination of String, Regex, and RouteSelectorAsync selectors.
- handler
- SubmitActionHandlerAsync<TState>
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.
Applies to
OnSubmitAction(RouteSelectorAsync, SubmitActionHandlerAsync<TState>)
Registers a handler that implements the submit action for an Action based Message Extension.
public Microsoft.Teams.AI.Application<TState> OnSubmitAction(Microsoft.Teams.AI.RouteSelectorAsync routeSelector, Microsoft.Teams.AI.SubmitActionHandlerAsync<TState> handler);
member this.OnSubmitAction : Microsoft.Teams.AI.RouteSelectorAsync * Microsoft.Teams.AI.SubmitActionHandlerAsync<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))> -> Microsoft.Teams.AI.Application<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))>
Public Function OnSubmitAction (routeSelector As RouteSelectorAsync, handler As SubmitActionHandlerAsync(Of TState)) As Application(Of TState)
Parameters
- routeSelector
- RouteSelectorAsync
Function that's used to select a route. The function returning true triggers the route.
- handler
- SubmitActionHandlerAsync<TState>
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.
Applies to
OnSubmitAction(String, SubmitActionHandlerAsync<TState>)
Registers a handler that implements the submit action for an Action based Message Extension.
public Microsoft.Teams.AI.Application<TState> OnSubmitAction(string commandId, Microsoft.Teams.AI.SubmitActionHandlerAsync<TState> handler);
member this.OnSubmitAction : string * Microsoft.Teams.AI.SubmitActionHandlerAsync<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))> -> Microsoft.Teams.AI.Application<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))>
Public Function OnSubmitAction (commandId As String, handler As SubmitActionHandlerAsync(Of TState)) As Application(Of TState)
Parameters
- commandId
- String
ID of the command to register the handler for.
- handler
- SubmitActionHandlerAsync<TState>
Function to call when the command is received.
Returns
The application instance for chaining purposes.
Applies to
OnSubmitAction(Regex, SubmitActionHandlerAsync<TState>)
Registers a handler that implements the submit action for an Action based Message Extension.
public Microsoft.Teams.AI.Application<TState> OnSubmitAction(System.Text.RegularExpressions.Regex commandIdPattern, Microsoft.Teams.AI.SubmitActionHandlerAsync<TState> handler);
member this.OnSubmitAction : System.Text.RegularExpressions.Regex * Microsoft.Teams.AI.SubmitActionHandlerAsync<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))> -> Microsoft.Teams.AI.Application<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))>
Public Function OnSubmitAction (commandIdPattern As Regex, handler As SubmitActionHandlerAsync(Of TState)) As Application(Of TState)
Parameters
- commandIdPattern
- Regex
Regular expression to match against the ID of the command to register the handler for.
- handler
- SubmitActionHandlerAsync<TState>
Function to call when the command is received.
Returns
The application instance for chaining purposes.