EnumerableExCaseTValue, TResult Method (FuncTValue, IDictionaryTValue, IEnumerableTResult) |
Returns a sequence from a dictionary based on the result of evaluating a selector function.
Namespace: System.LinqAssembly: System.Interactive (in System.Interactive.dll) Version: 1.2.0.0
Syntaxpublic static IEnumerable<TResult> Case<TValue, TResult>(
Func<TValue> selector,
IDictionary<TValue, IEnumerable<TResult>> sources
)
Parameters
- selector
- Type: SystemFuncTValue
Selector function used to pick a sequence from the given sources. - sources
- Type: System.Collections.GenericIDictionaryTValue, IEnumerableTResult
Dictionary mapping selector values onto resulting sequences.
Type Parameters
- TValue
- Type of the selector value.
- TResult
- Result sequence element type.
Return Value
Type:
IEnumerableTResultThe source sequence corresponding with the evaluated selector value; otherwise, an empty sequence.
See Also