Taal

Chain.Switch<T,R>(IDialog<T>, ICase<T,R>[]) Methode

Definitie

Wanneer het antecedent IDialog<TResult> is voltooid, ga je elk ICase<T,R> door en voer je de ContextualSelector<T,R>" uit van de eerste ICase<T,R> die de geretourneerde waarde van de antecedent-dialoog voldoet.

public static Microsoft.Bot.Builder.Dialogs.IDialog<R> Switch<T,R>(this Microsoft.Bot.Builder.Dialogs.IDialog<T> antecedent, params Microsoft.Bot.Builder.Dialogs.ICase<T,R>[] cases);
static member Switch : Microsoft.Bot.Builder.Dialogs.IDialog<'T> * Microsoft.Bot.Builder.Dialogs.ICase<'T, 'R>[] -> Microsoft.Bot.Builder.Dialogs.IDialog<'R>
<Extension()>
Public Function Switch(Of T, R) (antecedent As IDialog(Of T), ParamArray cases As ICase(Of T, R)()) As IDialog(Of R)

Type parameters

T

Het type van de voorafgaande dialoog.

R

Het type dialoog dat wordt teruggegeven door ContextualSelector<T,R>

Parameters

antecedent
IDialog<T>

De voorafgaande dialoog IDialog<TResult>.

cases
ICase<T,R>[]

Behuizingen voor de schakelaar

Retouren

IDialog<R>

Het resultaat IDialog<TResult>.

Van toepassing op