ITurnMiddleware.OnTurnAsync Method
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.
Triggers the middleware to process an activity during a bot turn.
public System.Threading.Tasks.Task OnTurnAsync(Microsoft.Teams.Core.BotApplication botApplication, Microsoft.Teams.Core.Schema.CoreActivity activity, Microsoft.Teams.Core.NextTurn nextTurn, System.Threading.CancellationToken cancellationToken = default);
abstract member OnTurnAsync : Microsoft.Teams.Core.BotApplication * Microsoft.Teams.Core.Schema.CoreActivity * Microsoft.Teams.Core.NextTurn * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function OnTurnAsync (botApplication As BotApplication, activity As CoreActivity, nextTurn As NextTurn, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- botApplication
- BotApplication
The bot application processing the current turn.
- activity
- CoreActivity
The incoming activity to process.
- nextTurn
- NextTurn
A delegate that invokes the next middleware in the pipeline. Call this to continue processing.
- cancellationToken
- CancellationToken
A cancellation token that can be used to cancel the operation.
Returns
A task that represents the asynchronous middleware execution.