QnAMakerDialog.BeginDialogAsync(DialogContext, Object, CancellationToken) Method

Definition

Called when the dialog is started and pushed onto the dialog stack.

public override System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult> BeginDialogAsync (Microsoft.Bot.Builder.Dialogs.DialogContext dc, object options = default, System.Threading.CancellationToken cancellationToken = default);
override this.BeginDialogAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult>
Public Overrides Function BeginDialogAsync (dc As DialogContext, Optional options As Object = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DialogTurnResult)

Parameters

dc
DialogContext

The 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

Task<DialogTurnResult>

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.

        You can use the <code data-dev-comment-type="paramref">options</code> parameter to include the QnA Maker context data,
        which represents context from the previous query. To do so, the value should include a
        `context` property of type <xref data-throw-if-not-resolved="true" uid="Microsoft.Bot.Builder.AI.QnA.QnAResponseContext"></xref>.

Applies to

See also