Chain.Case 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Case<R>(Regex, ContextualSelector<String,R>) |
根據正則表達式構造一個案例。 |
| Case<T,R>(Func<T,Boolean>, ContextualSelector<T,R>) |
建立一個案例。 |
Case<R>(Regex, ContextualSelector<String,R>)
- 來源:
- Chain.cs
根據正則表達式構造一個案例。
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>)
- 來源:
- Chain.cs
建立一個案例。
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
案件中進入的價值類型。
- R
選擇器回傳物件的類型。
參數
- selector
- ContextualSelector<T,R>
案件的情境選擇器。