HandoffRouteAttribute Class

Definition

Attribute to define a route that handles handoff action invoke activities.

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

Remarks

Decorate a method with this attribute to register it as a handler for handoff/action invoke activities. The method must match the HandoffHandler delegate signature.

[HandoffRoute]
public async Task OnHandoffAsync(ITurnContext turnContext, ITurnState turnState, string continuation, CancellationToken cancellationToken)
{
    // Handle handoff action
}

Constructors

Name Description
HandoffRouteAttribute(Boolean, UInt16, String)

Attribute to define a route that handles handoff action invoke activities.

Methods

Name Description
AddRoute(AgentApplication, MethodInfo)

Applies to