Share via


ActivityHandler.OnUnrecognizedActivityTypeAsync Method

Definition

Invoked when an activity other than a message, conversation update, or event is received when the base behavior of OnTurnAsync(ITurnContext, CancellationToken) is used. If overridden, this could potentially respond to any of the other activity types like ContactRelationUpdate or EndOfConversation. By default, this method does nothing.

protected virtual System.Threading.Tasks.Task OnUnrecognizedActivityTypeAsync (Microsoft.Bot.Builder.ITurnContext turnContext, System.Threading.CancellationToken cancellationToken);
abstract member OnUnrecognizedActivityTypeAsync : Microsoft.Bot.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnUnrecognizedActivityTypeAsync : Microsoft.Bot.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function OnUnrecognizedActivityTypeAsync (turnContext As ITurnContext, cancellationToken As CancellationToken) As Task

Parameters

turnContext
ITurnContext

The context object for this turn.

cancellationToken
CancellationToken

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

Returns

A task that represents the work queued to execute.

Remarks

When the OnTurnAsync(ITurnContext, CancellationToken) method receives an activity that is not a message, conversation update, message reaction, or event activity, it calls this method.

Applies to

See also