Dialog.ResumeDialogAsync(DialogContext, DialogReason, Object, CancellationToken) Method

Definition

Called when a child dialog completed this turn, returning control to this dialog.

public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult> ResumeDialogAsync (Microsoft.Bot.Builder.Dialogs.DialogContext dc, Microsoft.Bot.Builder.Dialogs.DialogReason reason, object result = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ResumeDialogAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Builder.Dialogs.DialogReason * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult>
override this.ResumeDialogAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Builder.Dialogs.DialogReason * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogTurnResult>
Public Overridable Function ResumeDialogAsync (dc As DialogContext, reason As DialogReason, Optional result As Object = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DialogTurnResult)

Parameters

dc
DialogContext

The dialog context for the current turn of the conversation.

reason
DialogReason

Reason why the dialog resumed.

result
Object

Optional, value returned from the dialog that was called. The type of the value returned is dependent on the child 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 this dialog is still active after this dialog turn has been processed.

         Generally, the child dialog was started with a call to
         <xref data-throw-if-not-resolved="true" uid="Microsoft.Bot.Builder.Dialogs.Dialog.BeginDialogAsync(Microsoft.Bot.Builder.Dialogs.DialogContext,System.Object,System.Threading.CancellationToken)"></xref>. However, if the
         <xref data-throw-if-not-resolved="true" uid="Microsoft.Bot.Builder.Dialogs.DialogContext.ReplaceDialogAsync(System.String,System.Object,System.Threading.CancellationToken)"></xref> method
         is called, the logical child dialog may be different than the original.

         If this method is *not* overridden, the dialog automatically ends when the user replies.

Applies to

See also