Share via


BotAdapter.Use(IMiddleware) Method

Definition

Adds middleware to the adapter's pipeline.

public Microsoft.Bot.Builder.BotAdapter Use (Microsoft.Bot.Builder.IMiddleware middleware);
member this.Use : Microsoft.Bot.Builder.IMiddleware -> Microsoft.Bot.Builder.BotAdapter
Public Function Use (middleware As IMiddleware) As BotAdapter

Parameters

middleware
IMiddleware

The middleware to add.

Returns

The updated adapter object.

Remarks

Middleware is added to the adapter at initialization time. For each turn, the adapter calls middleware in the order in which you added it.

Applies to