IDialogStack IDialogStack IDialogStack Interface

Definition

The stack of dialogs in the conversational process.

public interface IDialogStack
type IDialogStack = interface
Public Interface IDialogStack
Derived

Properties

Frames Frames Frames

The dialog frames active on the stack.

public System.Collections.Generic.IReadOnlyList<Delegate> Frames { get; }
member this.Frames : System.Collections.Generic.IReadOnlyList<Delegate>
Public ReadOnly Property Frames As IReadOnlyList(Of Delegate)

Methods

Call(IDialog, ResumeAfter) Call(IDialog, ResumeAfter) Call(IDialog, ResumeAfter)

Call a child dialog and add it to the top of the stack.

public void Call<R> (Microsoft.Bot.Builder.Dialogs.IDialog<R> child, Microsoft.Bot.Builder.Dialogs.ResumeAfter<R> resume);
abstract member Call : Microsoft.Bot.Builder.Dialogs.IDialog<'R> * Microsoft.Bot.Builder.Dialogs.ResumeAfter<'R> -> unit
Public Sub Call(Of R) (child As IDialog(Of R), resume As ResumeAfter(Of R))
Type Parameters
R

The type of result expected from the child dialog.

Parameters
child
IDialog<R>

The child dialog.

resume
ResumeAfter<R>

The method to resume when the child dialog has completed.

Done(R) Done(R) Done(R)

Complete the current dialog and return a result to the parent dialog.

public void Done<R> (R value);
abstract member Done : 'R -> unit
Public Sub Done(Of R) (value As R)
Type Parameters
R

The type of the result dialog.

Parameters
value

The value of the result.

Fail(Exception) Fail(Exception) Fail(Exception)

Fail the current dialog and return an exception to the parent dialog.

public void Fail (Exception error);
abstract member Fail : Exception -> unit
Public Sub Fail (error As Exception)
Parameters
error
Exception Exception Exception

The error.

Forward(IDialog, ResumeAfter, T, CancellationToken) Forward(IDialog, ResumeAfter, T, CancellationToken) Forward(IDialog, ResumeAfter, T, CancellationToken)

Call a child dialog, add it to the top of the stack and post the item to the child dialog.

public System.Threading.Tasks.Task Forward<R,T> (Microsoft.Bot.Builder.Dialogs.IDialog<R> child, Microsoft.Bot.Builder.Dialogs.ResumeAfter<R> resume, T item, System.Threading.CancellationToken token);
abstract member Forward : Microsoft.Bot.Builder.Dialogs.IDialog<'R> * Microsoft.Bot.Builder.Dialogs.ResumeAfter<'R> * 'T * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function Forward(Of R, T) (child As IDialog(Of R), resume As ResumeAfter(Of R), item As T, token As CancellationToken) As Task
Type Parameters
R

The type of result expected from the child dialog.

T

The type of the item posted to child dialog.

Parameters
child
IDialog<R>

The child dialog.

resume
ResumeAfter<R>

The method to resume when the child dialog has completed.

item

The item that will be posted to child dialog.

Returns

A task representing the Forward operation.

Post(E, ResumeAfter) Post(E, ResumeAfter) Post(E, ResumeAfter)

Post an internal event to the queue.

public void Post<E> (E event, Microsoft.Bot.Builder.Dialogs.ResumeAfter<E> resume);
abstract member Post : 'E * Microsoft.Bot.Builder.Dialogs.ResumeAfter<'E> -> unit
Public Sub Post(Of E) (event As E, resume As ResumeAfter(Of E))
Type Parameters
E
Parameters
event

The event to post to the queue.

resume
ResumeAfter<E>

The method to resume when the event has been delivered.

Reset() Reset() Reset()

Resets the stack.

public void Reset ();
abstract member Reset : unit -> unit
Public Sub Reset ()

Wait(ResumeAfter) Wait(ResumeAfter) Wait(ResumeAfter)

Suspend the current dialog until an external event has been sent to the bot.

public void Wait<R> (Microsoft.Bot.Builder.Dialogs.ResumeAfter<R> resume);
abstract member Wait : Microsoft.Bot.Builder.Dialogs.ResumeAfter<'R> -> unit
Public Sub Wait(Of R) (resume As ResumeAfter(Of R))
Type Parameters
R
Parameters
resume
ResumeAfter<R>

The method to resume when the event has been received.

Applies to