Sprog

AdaptiveCard.OnActionExecute Method

Definition

Overloads

Name Description
OnActionExecute(MultipleRouteSelector, ActionExecuteHandler)
Obsolete.

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

OnActionExecute(RouteSelector, ActionExecuteHandler, UInt16, String[], Boolean)

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

OnActionExecute(String, ActionExecuteHandler, UInt16, String[], Boolean)

Adds a route to the application for handling Adaptive Card Action.Execute events that will match on the verb using an exact string comparison.

OnActionExecute(Regex, ActionExecuteHandler, UInt16, String[], Boolean)

Adds a route to the application for handling Adaptive Card Action.Execute events that will match on the verb using a Regex pattern.

OnActionExecute(MultipleRouteSelector, ActionExecuteHandler)

Caution

This will be removed in future versions.

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

[System.Obsolete("This will be removed in future versions.")]
public Microsoft.Agents.Builder.App.AgentApplication OnActionExecute(Microsoft.Agents.Builder.App.MultipleRouteSelector routeSelectors, Microsoft.Agents.Builder.App.AdaptiveCards.ActionExecuteHandler handler);
[<System.Obsolete("This will be removed in future versions.")>]
member this.OnActionExecute : Microsoft.Agents.Builder.App.MultipleRouteSelector * Microsoft.Agents.Builder.App.AdaptiveCards.ActionExecuteHandler -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActionExecute (routeSelectors As MultipleRouteSelector, handler As ActionExecuteHandler) As AgentApplication

Parameters

routeSelectors
MultipleRouteSelector

Combination of String, Regex, and RouteSelectorAsync selectors.

handler
ActionExecuteHandler

Function to call when the route is triggered.

Returns

The application instance for chaining purposes.

Attributes

Applies to

OnActionExecute(RouteSelector, ActionExecuteHandler, UInt16, String[], Boolean)

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

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

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.

Applies to

OnActionExecute(String, ActionExecuteHandler, UInt16, String[], Boolean)

Adds a route to the application for handling Adaptive Card Action.Execute events that will match on the verb using an exact string comparison.

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

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.

Applies to

OnActionExecute(Regex, ActionExecuteHandler, UInt16, String[], Boolean)

Adds a route to the application for handling Adaptive Card Action.Execute events that will match on the verb using a Regex pattern.

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

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.

Applies to