Interface IMiddlewareSet
public interface IMiddlewareSet
Methods
ReceiveActivityWithStatusAsync(ITurnContext, AgentCallbackHandler, CancellationToken)
Processes an activity.
Task ReceiveActivityWithStatusAsync(ITurnContext turnContext, AgentCallbackHandler callback, CancellationToken cancellationToken)
Parameters
turnContext
ITurnContextThe context object for the turn.
callback
AgentCallbackHandlerThe delegate to call when the set finishes processing the activity.
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
A task that represents the work queued to execute.
Use(IMiddleware)
Adds a middleware object to the end of the set.
IMiddlewareSet Use(IMiddleware middleware)
Parameters
middleware
IMiddlewareThe middleware to add.
Returns
- IMiddlewareSet
The updated middleware set.