Language

TeamsChannel.OnCreated(ChannelUpdateHandler, String[], UInt16) Method

Definition

Registers a handler to be invoked when a new Teams channel is created.

public Microsoft.Agents.Extensions.MSTeams.Channels.TeamsChannel OnCreated(Microsoft.Agents.Extensions.MSTeams.Channels.ChannelUpdateHandler handler, string[] autoSignInHandlers = default, ushort rank = 32767);
member this.OnCreated : Microsoft.Agents.Extensions.MSTeams.Channels.ChannelUpdateHandler * string[] * uint16 -> Microsoft.Agents.Extensions.MSTeams.Channels.TeamsChannel
Public Function OnCreated (handler As ChannelUpdateHandler, Optional autoSignInHandlers As String() = Nothing, Optional rank As UShort = 32767) As TeamsChannel

Parameters

handler
ChannelUpdateHandler

The delegate that handles the channel creation event. This handler is called with information about the channel.

autoSignInHandlers
String[]

OAuth sign-in handler names for automatic sign-in before the route handler is invoked. Specify null to skip automatic sign-in.

rank
UInt16

Route evaluation order. Lower values run first. Defaults to Unspecified.

Returns

The current TeamsChannel instance, allowing for method chaining.

Remarks

Alternatively, the TeamsChannelCreatedRouteAttribute can be used to decorate a ChannelUpdateHandler method for the same purpose.

Applies to