Case__2_2 - waf/Rx.NET GitHub Wiki

QueryableEx.Case<TValue, TResult> Method (IQueryProvider, Expression<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.Providers (in System.Interactive.Providers.dll)

Syntax

public static IQueryable<TResult> Case<TValue, TResult>(
	this IQueryProvider provider,
	Expression<Func<TValue>> selector,
	IDictionary<TValue, IEnumerable<TResult>> sources
)

Parameters

provider

Type: System.Linq.IQueryProvider
Query provider.

selector

Type: System.Linq.Expressions.Expression<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: IQueryable<TResult>
The source sequence corresponding with the evaluated selector value; otherwise, an empty sequence.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQueryProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

QueryableEx Class
System.Linq Namespace

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