Chain.While(IDialog<T>, Func<T,IDialog<Boolean>>, Func<T,IDialog<T>>) Chain.While(IDialog<T>, Func<T,IDialog<Boolean>>, Func<T,IDialog<T>>) Chain.While(IDialog<T>, Func<T,IDialog<Boolean>>, Func<T,IDialog<T>>) Method

Definition

Create a IDialog<TResult> that represents a while loop.

public static Microsoft.Bot.Builder.Dialogs.IDialog<T> While<T> (this Microsoft.Bot.Builder.Dialogs.IDialog<T> initial, Func<T,Microsoft.Bot.Builder.Dialogs.IDialog<bool>> test, Func<T,Microsoft.Bot.Builder.Dialogs.IDialog<T>> body);
static member While : Microsoft.Bot.Builder.Dialogs.IDialog<'T> * Func<'T, Microsoft.Bot.Builder.Dialogs.IDialog<bool>> * Func<'T, Microsoft.Bot.Builder.Dialogs.IDialog<'T>> -> Microsoft.Bot.Builder.Dialogs.IDialog<'T>
<Extension()>
Public Function While(Of T) (initial As IDialog(Of T), test As Func(Of T, IDialog(Of Boolean)), body As Func(Of T, IDialog(Of T))) As IDialog(Of T)

Type Parameters

T

The type of the value.

Parameters

initial
IDialog<T>

The value if test is never true.

test
Func<T,IDialog<Boolean>>

The test to enter the while loop body.

body
Func<T,IDialog<T>>

The body of the while loop.

Returns

IDialog<T>

Zero or the last value returned by the body of the while loop.

Applies to