FetchActionRouteBuilder.WithHandler(FetchActionHandler) 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 fetch tasks.
public Microsoft.Agents.Extensions.MSTeams.MessageExtensions.FetchActionRouteBuilder WithHandler(Microsoft.Agents.Extensions.MSTeams.MessageExtensions.FetchActionHandler handler);
member this.WithHandler : Microsoft.Agents.Extensions.MSTeams.MessageExtensions.FetchActionHandler -> Microsoft.Agents.Extensions.MSTeams.MessageExtensions.FetchActionRouteBuilder
Public Function WithHandler (handler As FetchActionHandler) As FetchActionRouteBuilder
Parameters
- handler
- FetchActionHandler
An asynchronous delegate that processes the fetch action
Returns
The current instance of FetchActionRouteBuilder, enabling method chaining.
Remarks
Use this method to specify custom logic for handling fetch tasks in Teams message extensions. The handler receives the deserialized data from the incoming activity, allowing for type-safe processing of the action's payload.