ภาษา

TaskFetchRouteBuilder.WithHandler(TaskFetchHandler) Method

Definition

Configures the route to use the specified asynchronous handler for processing fetch requests.

public Microsoft.Agents.Extensions.MSTeams.TaskModules.TaskFetchRouteBuilder WithHandler(Microsoft.Agents.Extensions.MSTeams.TaskModules.TaskFetchHandler handler);
member this.WithHandler : Microsoft.Agents.Extensions.MSTeams.TaskModules.TaskFetchHandler -> Microsoft.Agents.Extensions.MSTeams.TaskModules.TaskFetchRouteBuilder
Public Function WithHandler (handler As TaskFetchHandler) As TaskFetchRouteBuilder

Parameters

handler
TaskFetchHandler

An asynchronous delegate that processes the fetch request.

Returns

The current instance of TaskFetchRouteBuilder, enabling method chaining.

Remarks

Use this method to specify custom logic for handling fetch requests in Teams task modules. The handler receives the deserialized data from the incoming activity, allowing for type-safe processing of the fetch request's payload.

Applies to