Language

AdaptiveCard.OnActionSubmit Method

Definition

Overloads

Name Description
OnActionSubmit(MultipleRouteSelector, ActionSubmitHandler)
Obsolete.

Adds a route to the application for handling Adaptive Card Action.Submit events.

OnActionSubmit(RouteSelector, ActionSubmitHandler, UInt16, String[], Boolean)

Adds a route to the application for handling Adaptive Card Action.Submit events.

OnActionSubmit(String, ActionSubmitHandler, UInt16, String[], Boolean)

Adds a route to the application for handling Adaptive Card Action.Submit events.

OnActionSubmit(Regex, ActionSubmitHandler, UInt16, String[], Boolean)

Adds a route to the application for handling Adaptive Card Action.Submit events.

OnActionSubmit(MultipleRouteSelector, ActionSubmitHandler)

Caution

This will be removed in future versions.

Adds a route to the application for handling Adaptive Card Action.Submit events.

[System.Obsolete("This will be removed in future versions.")]
public Microsoft.Agents.Builder.App.AgentApplication OnActionSubmit(Microsoft.Agents.Builder.App.MultipleRouteSelector routeSelectors, Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler handler);
[<System.Obsolete("This will be removed in future versions.")>]
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.

Attributes

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, UInt16, String[], Boolean)

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, ushort rank = 32767, string[] autoSignInHandlers = default, bool isAgenticOnly = false);
member this.OnActionSubmit : Microsoft.Agents.Builder.App.RouteSelector * Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler * uint16 * string[] * bool -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActionSubmit (routeSelector As RouteSelector, handler As ActionSubmitHandler, Optional rank As UShort = 32767, Optional autoSignInHandlers As String() = Nothing, Optional isAgenticOnly As Boolean = false) 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.

rank
UInt16

0 - ushort.MaxValue for order of evaluation. Ranks of the same value are evaluated in order of addition.

autoSignInHandlers
String[]

Optional list of OAuth handlers to run before the route handler.

isAgenticOnly
Boolean

True if the route is for Agentic requests only.

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, UInt16, String[], Boolean)

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, ushort rank = 32767, string[] autoSignInHandlers = default, bool isAgenticOnly = false);
member this.OnActionSubmit : string * Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler * uint16 * string[] * bool -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActionSubmit (verb As String, handler As ActionSubmitHandler, Optional rank As UShort = 32767, Optional autoSignInHandlers As String() = Nothing, Optional isAgenticOnly As Boolean = false) As AgentApplication

Parameters

verb
String

The named action to be handled.

handler
ActionSubmitHandler

Function to call when the action is triggered.

rank
UInt16

0 - ushort.MaxValue for order of evaluation. Ranks of the same value are evaluated in order of addition.

autoSignInHandlers
String[]

Optional list of OAuth handlers to run before the route handler.

isAgenticOnly
Boolean

True if the route is for Agentic requests only.

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, UInt16, String[], Boolean)

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, ushort rank = 32767, string[] autoSignInHandlers = default, bool isAgenticOnly = false);
member this.OnActionSubmit : System.Text.RegularExpressions.Regex * Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler * uint16 * string[] * bool -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActionSubmit (verbPattern As Regex, handler As ActionSubmitHandler, Optional rank As UShort = 32767, Optional autoSignInHandlers As String() = Nothing, Optional isAgenticOnly As Boolean = false) 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.

rank
UInt16

0 - ushort.MaxValue for order of evaluation. Ranks of the same value are evaluated in order of addition.

autoSignInHandlers
String[]

Optional list of OAuth handlers to run before the route handler.

isAgenticOnly
Boolean

True if the route is for Agentic requests only.

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