AdaptiveCard.OnActionSubmit 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
| Name | Description |
|---|---|
| OnActionSubmit(MultipleRouteSelector, ActionSubmitHandler) |
Adds a route to the application for handling Adaptive Card Action.Submit events. |
| OnActionSubmit(RouteSelector, ActionSubmitHandler) |
Adds a route to the application for handling Adaptive Card Action.Submit events. |
| OnActionSubmit(String, ActionSubmitHandler) |
Adds a route to the application for handling Adaptive Card Action.Submit events. |
| OnActionSubmit(Regex, ActionSubmitHandler) |
Adds a route to the application for handling Adaptive Card Action.Submit events. |
OnActionSubmit(MultipleRouteSelector, ActionSubmitHandler)
Adds a route to the application for handling Adaptive Card Action.Submit events.
public Microsoft.Agents.Builder.App.AgentApplication OnActionSubmit(Microsoft.Agents.Builder.App.MultipleRouteSelector routeSelectors, Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler handler);
member this.OnActionSubmit : Microsoft.Agents.Builder.App.MultipleRouteSelector * Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActionSubmit (routeSelectors As MultipleRouteSelector, handler As ActionSubmitHandler) As AgentApplication
Parameters
- routeSelectors
- MultipleRouteSelector
Combination of String, Regex, and RouteSelectorAsync selectors.
- handler
- ActionSubmitHandler
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.
Remarks
The route will be added for the specified verb(s) and will be filtered using the `actionSubmitFilter` option. The default filter is to use the `verb` field.
For outgoing AdaptiveCards you will need to include the verb's name in the cards Action.Submit. For example:
{
"type": "Action.Submit",
"title": "OK",
"data": {
"verb": "ok"
}
}
Applies to
OnActionSubmit(RouteSelector, ActionSubmitHandler)
Adds a route to the application for handling Adaptive Card Action.Submit events.
public Microsoft.Agents.Builder.App.AgentApplication OnActionSubmit(Microsoft.Agents.Builder.App.RouteSelector routeSelector, Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler handler);
member this.OnActionSubmit : Microsoft.Agents.Builder.App.RouteSelector * Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActionSubmit (routeSelector As RouteSelector, handler As ActionSubmitHandler) As AgentApplication
Parameters
- routeSelector
- RouteSelector
Function that's used to select a route. The function returning true triggers the route.
- handler
- ActionSubmitHandler
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.
Remarks
The route will be added for the specified verb(s) and will be filtered using the `actionSubmitFilter` option. The default filter is to use the `verb` field.
For outgoing AdaptiveCards you will need to include the verb's name in the cards Action.Submit. For example:
{
"type": "Action.Submit",
"title": "OK",
"data": {
"verb": "ok"
}
}
Applies to
OnActionSubmit(String, ActionSubmitHandler)
Adds a route to the application for handling Adaptive Card Action.Submit events.
public Microsoft.Agents.Builder.App.AgentApplication OnActionSubmit(string verb, Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler handler);
member this.OnActionSubmit : string * Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActionSubmit (verb As String, handler As ActionSubmitHandler) As AgentApplication
Parameters
- verb
- String
The named action to be handled.
- handler
- ActionSubmitHandler
Function to call when the action is triggered.
Returns
The application instance for chaining purposes.
Remarks
The route will be added for the specified verb(s) and will be filtered using the `actionSubmitFilter` option. The default filter is to use the `verb` field.
For outgoing AdaptiveCards you will need to include the verb's name in the cards Action.Submit. For example:
{
"type": "Action.Submit",
"title": "OK",
"data": {
"verb": "ok"
}
}
Applies to
OnActionSubmit(Regex, ActionSubmitHandler)
Adds a route to the application for handling Adaptive Card Action.Submit events.
public Microsoft.Agents.Builder.App.AgentApplication OnActionSubmit(System.Text.RegularExpressions.Regex verbPattern, Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler handler);
member this.OnActionSubmit : System.Text.RegularExpressions.Regex * Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActionSubmit (verbPattern As Regex, handler As ActionSubmitHandler) As AgentApplication
Parameters
- verbPattern
- Regex
Regular expression to match against the named action to be handled.
- handler
- ActionSubmitHandler
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.
Remarks
The route will be added for the specified verb(s) and will be filtered using the `actionSubmitFilter` option. The default filter is to use the `verb` field.
For outgoing AdaptiveCards you will need to include the verb's name in the cards Action.Submit. For example:
{
"type": "Action.Submit",
"title": "OK",
"data": {
"verb": "ok"
}
}