Language

TeamsConversationUpdateRouteAttribute Class

Definition

Attribute to define a route that handles conversation update activities, optionally matching a specific event.

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

Remarks

Decorate a method with this attribute to register it as a handler for conversation update activities. When eventName is provided, it is matched against ConversationUpdateEvents values. When omitted, all conversation update activities are matched. Use MembersAddedRouteAttribute or MembersRemovedRouteAttribute for the common member events. The method must match the TeamsRouteHandler delegate signature.

// Match any conversation update
[TeamsConversationUpdateRoute]
public async Task OnConversationUpdateAsync(ITeamsTurnContext turnContext, ITurnState turnState, CancellationToken cancellationToken)
{
    // Handle any conversation update
}

Constructors

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

Attribute to define a route that handles conversation update activities, optionally matching a specific event.

Methods

Name Description
AddRoute(AgentApplication, MethodInfo)

Applies to