Share via


Dialog Class

Definition

Base class for all dialogs.

public abstract class Dialog
type Dialog = class
Public MustInherit Class Dialog
Inheritance
Dialog
Derived

Constructors

Dialog(String)

Initializes a new instance of the Dialog class. Called from constructors in derived classes to initialize the Dialog class.

Fields

EndOfTurn

A DialogTurnResult that indicates that the current dialog is still active and waiting for input from the user next turn.

Properties

Id

Gets or sets id for the dialog.

Source

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

TelemetryClient

Gets or sets the IBotTelemetryClient to use for logging.

Methods

BeginDialogAsync(DialogContext, Object, CancellationToken)

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

ContinueDialogAsync(DialogContext, CancellationToken)

Called when the 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.

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.

OnPostBubbleEventAsync(DialogContext, DialogEvent, CancellationToken)

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

OnPreBubbleEventAsync(DialogContext, DialogEvent, CancellationToken)

Called before an event is bubbled to its parent.

RegisterSourceLocation(String, Int32)

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

RepromptDialogAsync(ITurnContext, DialogInstance, CancellationToken)

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

ResumeDialogAsync(DialogContext, DialogReason, Object, CancellationToken)

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

Extension Methods

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

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

Applies to