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