Sprog

ActionSubmitRouteAttribute Class

Definition

Attribute to define a route that handles Adaptive Card Action.Submit message activities, optionally matching a specific verb or verb pattern.

[Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler))]
[System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)]
public class ActionSubmitRouteAttribute : Attribute, Microsoft.Agents.Builder.App.IRouteAttribute
[<Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.AdaptiveCards.ActionSubmitHandler))>]
[<System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)>]
type ActionSubmitRouteAttribute = class
    inherit Attribute
    interface IRouteAttribute
Public Class ActionSubmitRouteAttribute
Inherits Attribute
Implements IRouteAttribute
Inheritance
ActionSubmitRouteAttribute
Attributes
Implements

Remarks

Decorate a method with this attribute to register it as a handler for Adaptive Card Action.Submit events. Provide verb for an exact match, verbRegex for a pattern match, or neither to match any Action.Submit message. verb and verbRegex are mutually exclusive. When a verb is matched, the activity value field configured by the actionSubmitFilter option (defaults to verb) is used. The method must match the ActionSubmitHandler delegate signature.

[ActionSubmitRoute("ok")]
public async Task OnOkAsync(ITurnContext turnContext, ITurnState turnState, object data, CancellationToken cancellationToken)
{
    // Handle Action.Submit with verb "ok"
}

Constructors

Name Description
ActionSubmitRouteAttribute(String, String, Boolean, UInt16, String)

Attribute to define a route that handles Adaptive Card Action.Submit message activities, optionally matching a specific verb or verb pattern.

Methods

Name Description
AddRoute(AgentApplication, MethodInfo)

Applies to