Chain.Switch<T,R>(IDialog<T>, ICase<T,R>[]) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当前件IDialog<TResult>完成后,逐一运行ICase<T,R>ContextualSelector<T,R>第一个前件对话返回值满足的“ICase<T,R>。
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)
类型参数
- T
前行对话的类型。
- R
返回的对话类型由 ContextualSelector<T,R>
参数
- antecedent
- IDialog<T>
前行对话。IDialog<TResult>
- cases
- ICase<T,R>[]
换位的案例
返回
IDialog<R>
结果 IDialog<TResult>。