Share via


Chain.Case 方法

定义

重载

Case<R>(Regex, ContextualSelector<String,R>)

基于正则表达式构造事例。

Case<T,R>(Func<T,Boolean>, ContextualSelector<T,R>)

构造事例。

Case<R>(Regex, ContextualSelector<String,R>)

基于正则表达式构造事例。

public static Microsoft.Bot.Builder.Dialogs.ICase<string,R> Case<R> (System.Text.RegularExpressions.Regex regex, Microsoft.Bot.Builder.Dialogs.ContextualSelector<string,R> selector);
static member Case : System.Text.RegularExpressions.Regex * Microsoft.Bot.Builder.Dialogs.ContextualSelector<string, 'R> -> Microsoft.Bot.Builder.Dialogs.ICase<string, 'R>
Public Function Case(Of R) (regex As Regex, selector As ContextualSelector(Of String, R)) As ICase(Of String, R)

类型参数

R

选择器返回的对象的类型。

参数

regex
Regex

条件的正则表达式。

selector
ContextualSelector<String,R>

事例的上下文选择器。

返回

案例。

适用于

Case<T,R>(Func<T,Boolean>, ContextualSelector<T,R>)

构造事例。

public static Microsoft.Bot.Builder.Dialogs.ICase<T,R> Case<T,R> (Func<T,bool> condition, Microsoft.Bot.Builder.Dialogs.ContextualSelector<T,R> selector);
static member Case : Func<'T, bool> * Microsoft.Bot.Builder.Dialogs.ContextualSelector<'T, 'R> -> Microsoft.Bot.Builder.Dialogs.ICase<'T, 'R>
Public Function Case(Of T, R) (condition As Func(Of T, Boolean), selector As ContextualSelector(Of T, R)) As ICase(Of T, R)

类型参数

T

case 的传入值的类型。

R

选择器返回的对象的类型。

参数

condition
Func<T,Boolean>

事例的条件。

selector
ContextualSelector<T,R>

事例的上下文选择器。

返回

适用于