语言

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

定义

当前件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>。

适用于