Language

CardButtonClickedRouteBuilder.WithHandler<TData> Method

Definition

Configures the route to use the specified asynchronous handler for processing card button click actions with deserialized data of type TData.

public Microsoft.Agents.Extensions.MSTeams.MessageExtensions.CardButtonClickedRouteBuilder WithHandler<TData>(Microsoft.Agents.Extensions.MSTeams.MessageExtensions.CardButtonClickedHandler<TData> handler);
member this.WithHandler : Microsoft.Agents.Extensions.MSTeams.MessageExtensions.CardButtonClickedHandler<'Data> -> Microsoft.Agents.Extensions.MSTeams.MessageExtensions.CardButtonClickedRouteBuilder
Public Function WithHandler(Of TData) (handler As CardButtonClickedHandler(Of TData)) As CardButtonClickedRouteBuilder

Type Parameters

TData

Parameters

Returns

The current instance of CardButtonClickedRouteBuilder, enabling method chaining.

Remarks

Use this method to specify custom logic for handling card button click actions in Teams message extensions. The handler receives the deserialized data from the incoming activity, allowing for type-safe processing of the action's payload.

Applies to