Language

TeamsTeamRenamedRouteAttribute Class

Definition

Attribute to define a route that handles Teams team renamed events.

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

Remarks

Decorate a method with this attribute to register it as a handler for team renamed events in Teams. The method must match the TeamUpdateHandler delegate signature.

[TeamsTeamRenamedRoute]
public async Task OnTeamRenamedAsync(ITeamsTurnContext turnContext, ITurnState turnState, Microsoft.Teams.Apps.Schema.Team team, CancellationToken cancellationToken)
{
    // Handle team renamed event
}

Alternatively, OnRenamed(TeamUpdateHandler, String[], UInt16) can be used to register the handler via the fluent API.

Constructors

Name Description
TeamsTeamRenamedRouteAttribute(Boolean, UInt16, String)

Attribute to define a route that handles Teams team renamed events.

Methods

Name Description
AddRoute(AgentApplication, MethodInfo)

Registers a route for the specified method within the given agent application.

Applies to