Chain.Switch<T,R>(IDialog<T>, ICase<T,R>[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When the antecedent IDialog<TResult> has completed, go through each ICase<T,R> and run the ContextualSelector<T,R>" of the first ICase<T,R> that the returned value by the antecedent dialog satisfies.
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
The type of the antecedent dialog.
- R
The type of the Dialog returned by ContextualSelector<T,R>
Parameters
- antecedent
- IDialog<T>
The antecedent dialog IDialog<TResult>.
- cases
- ICase<T,R>[]
Cases for the switch
Returns
The result IDialog<TResult>.