Case__2 - waf/Rx.NET GitHub Wiki

EnumerableEx.Case<TValue, TResult> Method (Func<TValue>, IDictionary<TValue, IEnumerable<TResult>>)

Returns a sequence from a dictionary based on the result of evaluating a selector function.

Namespace: System.Linq
Assembly: System.Interactive (in System.Interactive.dll)

Syntax

public static IEnumerable<TResult> Case<TValue, TResult>(
	Func<TValue> selector,
	IDictionary<TValue, IEnumerable<TResult>> sources
)

Parameters

selector

Type: System.Func<TValue>
Selector function used to pick a sequence from the given sources.

sources

Type: System.Collections.Generic.IDictionary<TValue, IEnumerable<TResult>>
Dictionary mapping selector values onto resulting sequences.

Type Parameters

TValue

Type of the selector value.

TResult

Result sequence element type.

Return Value

Type: IEnumerable<TResult>
The source sequence corresponding with the evaluated selector value; otherwise, an empty sequence.

See Also

Reference

EnumerableEx Class
System.Linq Namespace

⚠️ **GitHub.com Fallback** ⚠️