Table of Contents

Delegate RouteHandler

Namespace
Microsoft.Agents.Builder.App
Assembly
Microsoft.Agents.Builder.dll

The common route handler. Function for handling an incoming request.

public delegate Task RouteHandler(ITurnContext turnContext, ITurnState turnState, CancellationToken cancellationToken)

Parameters

turnContext ITurnContext

A strongly-typed context object for this turn.

turnState ITurnState

The turn state object that stores arbitrary data for this turn.

cancellationToken CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

Constructors

RouteHandler(object, nint)

public RouteHandler(object @object, nint method)

Parameters

object object
method nint

Methods

BeginInvoke(ITurnContext, ITurnState, CancellationToken, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(ITurnContext turnContext, ITurnState turnState, CancellationToken cancellationToken, AsyncCallback callback, object @object)

Parameters

turnContext ITurnContext
turnState ITurnState
cancellationToken CancellationToken
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(IAsyncResult)

public virtual Task EndInvoke(IAsyncResult result)

Parameters

result IAsyncResult

Returns

Task

Invoke(ITurnContext, ITurnState, CancellationToken)

public virtual Task Invoke(ITurnContext turnContext, ITurnState turnState, CancellationToken cancellationToken)

Parameters

turnContext ITurnContext
turnState ITurnState
cancellationToken CancellationToken

Returns

Task