Share via


Chain.Void Method

Definition

Overloads

Void<T,R>(IDialog<T>)

Call the voided IDialog<TResult>, ignore the result, then restart the original dialog wait.

Void<T>(IDialog<T>, IDialogStack)

Call the voided IDialog<TResult>, ignore the result, then restart the original dialog wait.

Void<T,R>(IDialog<T>)

Call the voided IDialog<TResult>, ignore the result, then restart the original dialog wait.

public static Microsoft.Bot.Builder.Dialogs.IDialog<R> Void<T,R> (this Microsoft.Bot.Builder.Dialogs.IDialog<T> antecedent);
static member Void : Microsoft.Bot.Builder.Dialogs.IDialog<'T> -> Microsoft.Bot.Builder.Dialogs.IDialog<'R>
<Extension()>
Public Function Void(Of T, R) (antecedent As IDialog(Of T)) As IDialog(Of R)

Type Parameters

T

The type of the voided dialog.

R

The type of the original dialog wait.

Parameters

antecedent
IDialog<T>

The voided dialog.

Returns

IDialog<R>

The dialog that produces the item to satisfy the original wait.

Remarks

The purpose of this method is to wrap an antecedent dialog A with a new dialog D to push on the stack on top of the existing stack top dialog L. 1. D will call A. 2. D will receive the value of A when A is done. 3. D will re-initiate the typed wait (often for a message) for which a method of L was waiting 4. D will receive that value of the re-initiated typed wait. 5. D will return that value of the typed wait to L. This depends on the symmetry of IDialogStack.Done and IDialogStack.Wait in how they satisfy typed waits.

Applies to

Void<T>(IDialog<T>, IDialogStack)

Call the voided IDialog<TResult>, ignore the result, then restart the original dialog wait.

public static Microsoft.Bot.Builder.Dialogs.IDialog<object> Void<T> (this Microsoft.Bot.Builder.Dialogs.IDialog<T> antecedent, Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack stack);
static member Void : Microsoft.Bot.Builder.Dialogs.IDialog<'T> * Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack -> Microsoft.Bot.Builder.Dialogs.IDialog<obj>
<Extension()>
Public Function Void(Of T) (antecedent As IDialog(Of T), stack As IDialogStack) As IDialog(Of Object)

Type Parameters

T

The type of the voided dialog.

Parameters

antecedent
IDialog<T>

The voided dialog.

stack
IDialogStack

The dialog stack.

Returns

The dialog that produces the item to satisfy the original wait.

Remarks

(value types don't support generic parameter variance - so this reflection-based method may not work) It's okay to loose type information (i.e. IDialog{object}) because voided dialogs are called with a null ResumeAfter<T> because they are hacking the stack to satisfy the wait of the interrupted dialog.

Applies to