Share via


WaterfallStepContext Class

Definition

Provides context for a step in a WaterfallDialog.

public class WaterfallStepContext : Microsoft.Bot.Builder.Dialogs.DialogContext
type WaterfallStepContext = class
    inherit DialogContext
Public Class WaterfallStepContext
Inherits DialogContext
Inheritance
WaterfallStepContext

Remarks

The Context property contains the ITurnContext for the current turn.

Properties

ActiveDialog

Gets the cached instance of the active dialog on the top of the stack or null if the stack is empty.

(Inherited from DialogContext)
Child

Gets dialog context for child if there is an active child.

(Inherited from DialogContext)
Context

Gets the context for the current turn of conversation.

(Inherited from DialogContext)
DialogManager
Obsolete.

Gets the current DialogManager for this dialogContext. This property is obsolete.

(Inherited from DialogContext)
Dialogs

Gets the set of dialogs which are active for the current dialog container.

(Inherited from DialogContext)
Index

Gets the index of the current waterfall step being executed.

Options

Gets any options the waterfall dialog was called with.

Parent

Gets or sets the parent DialogContext, if any. Used when searching for the ID of a dialog to start.

(Inherited from DialogContext)
Reason

Gets the reason the waterfall step is being executed.

Result

Gets the result from the previous waterfall step.

Services

Gets the services collection which is contextual to this dialog context.

(Inherited from DialogContext)
Stack

Gets the current dialog stack.

(Inherited from DialogContext)
State

Gets or sets the DialogStateManager which manages view of all memory scopes.

(Inherited from DialogContext)
Values

Gets a dictionary of values which will be persisted across all waterfall actions.

Methods

BeginDialogAsync(String, Object, CancellationToken)

Starts a new dialog and pushes it onto the dialog stack.

(Inherited from DialogContext)
CancelAllDialogsAsync(Boolean, String, Object, CancellationToken)

Deletes any existing dialog stack thus canceling all dialogs on the stack.

(Inherited from DialogContext)
CancelAllDialogsAsync(CancellationToken)

Deletes any existing dialog stack thus canceling all dialogs on the stack.

(Inherited from DialogContext)
ContinueDialogAsync(CancellationToken)

Continues execution of the active dialog, if there is one, by passing the current DialogContext to the active dialog's ContinueDialogAsync(DialogContext, CancellationToken) method.

(Inherited from DialogContext)
EmitEventAsync(String, Object, Boolean, Boolean, CancellationToken)

Searches for a dialog with a given ID. Emits a named event for the current dialog, or someone who started it, to handle.

(Inherited from DialogContext)
EndDialogAsync(Object, CancellationToken)

Ends a dialog by popping it off the stack and returns an optional result to the dialog's parent. The parent dialog is the dialog the started the on being ended via a call to either BeginDialogAsync(String, Object, CancellationToken) or PromptAsync(String, PromptOptions, CancellationToken). The parent dialog will have its ResumeDialogAsync(DialogContext, DialogReason, Object, CancellationToken) method invoked with any returned result. If the parent dialog hasn't implemented a ResumeDialogAsync method, then it will be automatically ended as well and the result passed to its parent. If there are no more parent dialogs on the stack then processing of the turn will end.

(Inherited from DialogContext)
FindDialog(String)

Find the dialog id for the given context.

(Inherited from DialogContext)
GetLocale()

Obtain the CultureInfo in DialogContext.

(Inherited from DialogContext)
NextAsync(Object, CancellationToken)

Skips to the next step of the waterfall.

PromptAsync(String, PromptOptions, CancellationToken)

Helper function to simplify formatting the options for calling a prompt dialog. This helper will take an options argument and then call BeginDialogAsync(String, Object, CancellationToken).

(Inherited from DialogContext)
ReplaceDialogAsync(String, Object, CancellationToken)

Starts a new dialog and replaces on the stack the currently active dialog with the new one. This is particularly useful for creating loops or redirecting to another dialog.

(Inherited from DialogContext)
RepromptDialogAsync(CancellationToken)

Calls the currently active dialog's RepromptDialogAsync(ITurnContext, DialogInstance, CancellationToken) method. Used with dialogs that implement a re-prompt behavior.

(Inherited from DialogContext)

Extension Methods

DebuggerStepAsync(DialogContext, OnCondition, DialogEvent, CancellationToken)

Call into active IDialogDebugger and let it know that we are at given point.

DebuggerStepAsync(DialogContext, Dialog, String, CancellationToken)

Call into active IDialogDebugger and let it know that we are at given point in the dialog.

DebuggerStepAsync(DialogContext, Recognizer, String, CancellationToken)

Call into active IDialogDebugger and let it know that we are at given point in the Recognizer.

DebuggerStepAsync(DialogContext, IRecognizer, String, CancellationToken)

Call into active IDialogDebugger and let it know that we are at given point in the Recognizer.

GetDebugger(DialogContext)

Extension method to get IDialogDebugger from DialogContext.

Applies to