ITurnMiddleware Interface
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.
Defines a middleware component that can process or modify activities during a bot turn.
public interface ITurnMiddleware
type ITurnMiddleware = interface
Public Interface ITurnMiddleware
Remarks
Implement this interface to add custom logic before or after the bot processes an activity. Middleware can perform tasks such as logging, authentication, or altering activities. Multiple middleware components can be chained together; each should call the nextTurn delegate to continue the pipeline.
Methods
| Name | Description |
|---|---|
| OnTurnAsync(BotApplication, CoreActivity, NextTurn, CancellationToken) |
Triggers the middleware to process an activity during a bot turn. |