Share via


ActionContext Class

Definition

Extends the DialogContext with additional methods for manipulating the executing sequence of actions for an AdaptiveDialog.

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

Constructors

ActionContext(DialogSet, DialogContext, DialogState, List<ActionState>, String)

Initializes a new instance of the ActionContext class.

Properties

Actions

Gets or sets list of actions being executed.

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)
Changes

Gets list of changes that are queued to be applied.

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)
Parent

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

(Inherited from DialogContext)
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)

Methods

ApplyChangesAsync(CancellationToken)

Applies any queued up changes.

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)
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)
QueueChanges(ActionChangeList)

Queues up a set of changes that will be applied when ApplyChanges is called.

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