Table of Contents

Interface IMiddlewareSet

Namespace
Microsoft.Agents.Builder
Assembly
Microsoft.Agents.Builder.dll
public interface IMiddlewareSet

Methods

ReceiveActivityWithStatusAsync(ITurnContext, AgentCallbackHandler, CancellationToken)

Processes an activity.

Task ReceiveActivityWithStatusAsync(ITurnContext turnContext, AgentCallbackHandler callback, CancellationToken cancellationToken)

Parameters

turnContext ITurnContext

The context object for the turn.

callback AgentCallbackHandler

The delegate to call when the set finishes processing the activity.

cancellationToken CancellationToken

A 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 IMiddleware

The middleware to add.

Returns

IMiddlewareSet

The updated middleware set.