ComponentDialog.OnEndDialogAsync Method

Definition

Called when the dialog is ending.

protected virtual System.Threading.Tasks.Task OnEndDialogAsync (Microsoft.Bot.Builder.ITurnContext context, Microsoft.Bot.Builder.Dialogs.DialogInstance instance, Microsoft.Bot.Builder.Dialogs.DialogReason reason, System.Threading.CancellationToken cancellationToken = default);
abstract member OnEndDialogAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.Dialogs.DialogInstance * Microsoft.Bot.Builder.Dialogs.DialogReason * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnEndDialogAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.Dialogs.DialogInstance * Microsoft.Bot.Builder.Dialogs.DialogReason * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function OnEndDialogAsync (context As ITurnContext, instance As DialogInstance, reason As DialogReason, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

context
ITurnContext

The context object for this turn.

instance
DialogInstance

State information associated with the inner dialog stack of this component dialog.

reason
DialogReason

Reason why the dialog ended.

cancellationToken
CancellationToken

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

Returns

A Task representing the asynchronous operation.

Remarks

Override this method in a derived class to implement any additional logic that should happen at the component level, after all inner dialogs have been canceled.

Applies to

See also