ComponentDialog.OnBeginDialogAsync 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.
Called when the dialog is started and pushed onto the parent's dialog stack.
protected virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult> OnBeginDialogAsync (Microsoft.Bot.Builder.Dialogs.DialogContext innerDc, object options, System.Threading.CancellationToken cancellationToken = default);
abstract member OnBeginDialogAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult>
override this.OnBeginDialogAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult>
Protected Overridable Function OnBeginDialogAsync (innerDc As DialogContext, options As Object, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DialogTurnResult)
Parameters
- innerDc
- DialogContext
The inner DialogContext for the current turn of conversation.
- options
- Object
Optional, initial information to pass to the dialog.
- 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
If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog.
By default, this calls the BeginDialogAsync(DialogContext, Object, CancellationToken) method of the component dialog's initial dialog, as defined by InitialDialogId.
Override this method in a derived class to implement interrupt logic.