CardButtonClickedRouteBuilder.WithHandler<TData> 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.
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
- handler
- CardButtonClickedHandler<TData>
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.