Language

TaskSubmitRouteBuilder.WithHandler(TaskSubmitHandler) Method

Definition

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

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

Parameters

handler
TaskSubmitHandler

An asynchronous delegate that processes the submit request.

Returns

The current instance of TaskSubmitRouteBuilder, enabling method chaining.

Remarks

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

Applies to