WaterfallDialog Class

Definition

Dialog optimized for prompting a user with a series of questions. Waterfalls accept a stack of functions which will be executed in sequence. Each waterfall step can ask a question of the user and the user's response will be passed as an argument to the next waterfall step.

public class WaterfallDialog : Microsoft.Bot.Builder.Dialogs.Dialog
type WaterfallDialog = class
    inherit Dialog
Public Class WaterfallDialog
Inherits Dialog
Inheritance
WaterfallDialog
Derived

Constructors

WaterfallDialog(String, IEnumerable<WaterfallStep>)

Initializes a new instance of the WaterfallDialog class.

Properties

Id

Gets or sets id for the dialog.

(Inherited from Dialog)
Source

Gets the information of the cref="SourceRange"/>.

(Inherited from Dialog)
TelemetryClient

Gets or sets the IBotTelemetryClient to use for logging.

(Inherited from Dialog)

Methods

AddStep(WaterfallStep)

Adds a new step to the waterfall.

BeginDialogAsync(DialogContext, Object, CancellationToken)

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

ContinueDialogAsync(DialogContext, CancellationToken)

Called when the waterfall dialog is continued, where it is the active dialog and the user replies with a new activity.

EndDialogAsync(ITurnContext, DialogInstance, DialogReason, CancellationToken)

Called when the dialog is ending.

GetVersion()

Gets a unique string which represents the version of this dialog. If the version changes between turns the dialog system will emit a DialogChanged event.

OnComputeId()

Builds the compute Id for the dialog.

(Inherited from Dialog)
OnDialogEventAsync(DialogContext, DialogEvent, CancellationToken)

Called when an event has been raised, using DialogContext.emitEvent(), by either the current dialog or a dialog that the current dialog started.

(Inherited from Dialog)
OnPostBubbleEventAsync(DialogContext, DialogEvent, CancellationToken)

Called after an event was bubbled to all parents and wasn't handled.

(Inherited from Dialog)
OnPreBubbleEventAsync(DialogContext, DialogEvent, CancellationToken)

Called before an event is bubbled to its parent.

(Inherited from Dialog)
OnStepAsync(WaterfallStepContext, CancellationToken)

Called when an individual waterfall step is being executed.

RegisterSourceLocation(String, Int32)

Registers a cref="SourceRange"/> in the provided location.

(Inherited from Dialog)
RepromptDialogAsync(ITurnContext, DialogInstance, CancellationToken)

Called when the dialog should re-prompt the user for input.

(Inherited from Dialog)
ResumeDialogAsync(DialogContext, DialogReason, Object, CancellationToken)

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

RunStepAsync(DialogContext, Int32, DialogReason, Object, CancellationToken)

Excutes a step of the waterfall dialog.

Extension Methods

RunAsync(Dialog, ITurnContext, IStatePropertyAccessor<DialogState>, CancellationToken)

Creates a dialog stack and starts a dialog, pushing it onto the stack.

Applies to