Share via


RouteSelector Delegate

Definition

Function for selecting whether a route handler should be triggered.

public delegate System.Threading.Tasks.Task<bool> RouteSelector(ITurnContext turnContext, CancellationToken cancellationToken);
type RouteSelector = delegate of ITurnContext * CancellationToken -> Task<bool>
Public Delegate Function RouteSelector(turnContext As ITurnContext, cancellationToken As CancellationToken) As Task(Of Boolean) 

Parameters

turnContext
ITurnContext

Context for the current turn of conversation with the user.

cancellationToken
CancellationToken

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

Return Value

True if the route handler should be triggered. Otherwise, False.

Applies to