SlackConversationUpdateRouteAttribute Class
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.
Attribute to define a route that handles conversation update activities, optionally matching a specific event.
[Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Extensions.Slack.SlackRouteHandler))]
[Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.RouteHandler))]
[Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.TypedRouteHandler<Microsoft.Agents.Extensions.Slack.ISlackActivity>))]
[System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)]
public class SlackConversationUpdateRouteAttribute : Attribute, Microsoft.Agents.Builder.App.IRouteAttribute
[<Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Extensions.Slack.SlackRouteHandler))>]
[<Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.RouteHandler))>]
[<Microsoft.Agents.Builder.App.RouteHandlerType(typeof(Microsoft.Agents.Builder.App.TypedRouteHandler<Microsoft.Agents.Extensions.Slack.ISlackActivity>))>]
[<System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)>]
type SlackConversationUpdateRouteAttribute = class
inherit Attribute
interface IRouteAttribute
Public Class SlackConversationUpdateRouteAttribute
Inherits Attribute
Implements IRouteAttribute
- Inheritance
-
SlackConversationUpdateRouteAttribute
- 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 SlackRouteHandler, RouteHandler, or TypedRouteHandler<T> of ISlackActivity delegate signature.
// Match any conversation update
[SlackConversationUpdateRoute]
public async Task OnConversationUpdateAsync(ISlackTurnContext turnContext, ITurnState turnState, CancellationToken cancellationToken)
{
// Handle any conversation update
}
Constructors
| Name | Description |
|---|---|
| SlackConversationUpdateRouteAttribute(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) | |