BotFrameworkConfigurationBuilder.UseMiddleware Method

Definition

Overloads

UseMiddleware(IMiddleware)

Adds a piece of IMiddleware to the bot's middleware pipeline.

UseMiddleware(Func<ITurnContext,Exception,Task>)

Adds an Error Handler the bot.

UseMiddleware(IMiddleware)

Adds a piece of IMiddleware to the bot's middleware pipeline.

public Microsoft.Bot.Builder.Integration.AspNet.WebApi.BotFrameworkConfigurationBuilder UseMiddleware (Microsoft.Bot.Builder.IMiddleware middleware);
member this.UseMiddleware : Microsoft.Bot.Builder.IMiddleware -> Microsoft.Bot.Builder.Integration.AspNet.WebApi.BotFrameworkConfigurationBuilder
Public Function UseMiddleware (middleware As IMiddleware) As BotFrameworkConfigurationBuilder

Parameters

middleware
IMiddleware

An instance of middleware that should be added to the bot's middleware pipeline.

Returns

A reference to this instance after the operation has completed.

See also

Applies to

UseMiddleware(Func<ITurnContext,Exception,Task>)

Adds an Error Handler the bot.

public Microsoft.Bot.Builder.Integration.AspNet.WebApi.BotFrameworkConfigurationBuilder UseMiddleware (Func<Microsoft.Bot.Builder.ITurnContext,Exception,System.Threading.Tasks.Task> errorHandler);
member this.UseMiddleware : Func<Microsoft.Bot.Builder.ITurnContext, Exception, System.Threading.Tasks.Task> -> Microsoft.Bot.Builder.Integration.AspNet.WebApi.BotFrameworkConfigurationBuilder
Public Function UseMiddleware (errorHandler As Func(Of ITurnContext, Exception, Task)) As BotFrameworkConfigurationBuilder

Parameters

errorHandler
Func<ITurnContext,Exception,Task>

An instance of middleware that should be added to the bot's middleware pipeline.

Returns

A reference to this instance after the operation has completed.

See also

Applies to