ActivityHandler.OnUnrecognizedActivityTypeAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- ActivityTypes
- OnTurnAsync(ITurnContext, CancellationToken)
- OnMessageActivityAsync(ITurnContext<IMessageActivity>, CancellationToken)
- OnConversationUpdateActivityAsync(ITurnContext<IConversationUpdateActivity>, CancellationToken)
- OnMessageReactionActivityAsync(ITurnContext<IMessageReactionActivity>, CancellationToken)
- OnEventActivityAsync(ITurnContext<IEventActivity>, CancellationToken)
- Type