ActionExecuteRouteAttribute Class
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.
Attribute to define a route that handles Adaptive Card Action.Execute invoke activities, optionally
matching a specific verb or verb pattern.
[Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.AdaptiveCards.ActionExecuteHandler))]
[Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.AdaptiveCards.ActionExecuteValueHandler))]
[System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)]
public class ActionExecuteRouteAttribute : Attribute, Microsoft.Agents.Builder.App.IRouteAttribute
[<Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.AdaptiveCards.ActionExecuteHandler))>]
[<Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.AdaptiveCards.ActionExecuteValueHandler))>]
[<System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)>]
type ActionExecuteRouteAttribute = class
inherit Attribute
interface IRouteAttribute
Public Class ActionExecuteRouteAttribute
Inherits Attribute
Implements IRouteAttribute
- Inheritance
-
ActionExecuteRouteAttribute
- Attributes
- Implements
Remarks
Decorate a method with this attribute to register it as a handler for Adaptive Card Action.Execute events. Provide verb for an exact match, verbRegex for a pattern match, or neither to match any verb. verb and verbRegex are mutually exclusive. The method must match the ActionExecuteHandler delegate signature.
[ActionExecuteRoute("doStuff")]
public async Task<AdaptiveCardInvokeResponse> OnDoStuffAsync(ITurnContext turnContext, ITurnState turnState, object data, CancellationToken cancellationToken)
{
// Handle Action.Execute with verb "doStuff"
}
Constructors
| Name | Description |
|---|---|
| ActionExecuteRouteAttribute(String, String, Boolean, UInt16, String) |
Attribute to define a route that handles Adaptive Card |
Methods
| Name | Description |
|---|---|
| AddRoute(AgentApplication, MethodInfo) | |