TeamsChannel.OnShared(ChannelUpdateHandler, String[], UInt16) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a handler to be invoked when a Teams channel is shared.
public Microsoft.Agents.Extensions.MSTeams.Channels.TeamsChannel OnShared(Microsoft.Agents.Extensions.MSTeams.Channels.ChannelUpdateHandler handler, string[] autoSignInHandlers = default, ushort rank = 32767);
member this.OnShared : Microsoft.Agents.Extensions.MSTeams.Channels.ChannelUpdateHandler * string[] * uint16 -> Microsoft.Agents.Extensions.MSTeams.Channels.TeamsChannel
Public Function OnShared (handler As ChannelUpdateHandler, Optional autoSignInHandlers As String() = Nothing, Optional rank As UShort = 32767) As TeamsChannel
Parameters
- handler
- ChannelUpdateHandler
The delegate that handles the channel shared 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 TeamsChannelSharedRouteAttribute can be used to decorate a ChannelUpdateHandler method for the same purpose.