Chain.Switch<T,R>(IDialog<T>, ICase<T,R>[]) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Lorsque l’antécédent IDialog<TResult> est terminé, on parcourt chacun ICase<T,R> et on exécute le ContextualSelector<T,R>« du premier ICase<T,R> que la valeur retournée par le dialogue antécédents satisfait.
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)
Paramètres de type
- T
Le type de dialogue précédent.
- R
Le type du Dialogue est retourné par ContextualSelector<T,R>
Paramètres
- antecedent
- IDialog<T>
Le dialogue IDialog<TResult>antécédent.
- cases
- ICase<T,R>[]
Boîtiers pour le changement
Retours
Le résultat IDialog<TResult>.