Language

TeamsHandoffRouteAttribute Class

Definition

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

[Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Extensions.MSTeams.App.TeamsHandoffHandler))]
[System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)]
public class TeamsHandoffRouteAttribute : Attribute, Microsoft.Agents.Builder.App.IRouteAttribute
[<Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Extensions.MSTeams.App.TeamsHandoffHandler))>]
[<System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)>]
type TeamsHandoffRouteAttribute = class
    inherit Attribute
    interface IRouteAttribute
Public Class TeamsHandoffRouteAttribute
Inherits Attribute
Implements IRouteAttribute
Inheritance
TeamsHandoffRouteAttribute
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 TeamsHandoffHandler delegate signature.

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

Constructors

Name Description
TeamsHandoffRouteAttribute(Boolean, UInt16, String)

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

Methods

Name Description
AddRoute(AgentApplication, MethodInfo)

Applies to