protected virtual async Task OnDialogEndAsync(DialogContext dc, DialogReason reason, CancellationToken cancellationToken = default(CancellationToken)) { if (reason == DialogReason.CancelCalled) { await dc.CancelAllAsync(cancellationToken).ConfigureAwait(false); } }
protected virtual async Task OnDialogEndAsync(DialogContext dc, DialogReason reason) { if (reason == DialogReason.CancelCalled) { await dc.CancelAllAsync().ConfigureAwait(false); } }
public override async Task DialogEndAsync(ITurnContext turnContext, DialogInstance instance, DialogReason reason, CancellationToken cancellationToken = default(CancellationToken)) { // Forward cancel to inner dialogs if (reason == DialogReason.CancelCalled) { var dialogState = (DialogState)instance.State[PersistedDialogState]; var innerDc = new DialogContext(_dialogs, turnContext, dialogState); await innerDc.CancelAllAsync(cancellationToken).ConfigureAwait(false); } await OnDialogEndAsync(turnContext, instance, reason, cancellationToken).ConfigureAwait(false); }