If__1_3 - waf/Rx.NET GitHub Wiki
QueryableEx.If<TResult> Method (IQueryProvider, Expression<Func<Boolean>>, IEnumerable<TResult>, IEnumerable<TResult>)
Returns an enumerable sequence based on the evaluation result of the given condition.
Namespace: System.Linq
Assembly: System.Interactive.Providers (in System.Interactive.Providers.dll)
public static IQueryable<TResult> If<TResult>(
this IQueryProvider provider,
Expression<Func<bool>> condition,
IEnumerable<TResult> thenSource,
IEnumerable<TResult> elseSource
)
Type: System.Linq.IQueryProvider
Query provider.
Type: System.Linq.Expressions.Expression<Func<Boolean>>
Condition to evaluate.
Type: System.Collections.Generic.IEnumerable<TResult>
Sequence to return in case the condition evaluates true.
Type: System.Collections.Generic.IEnumerable<TResult>
Sequence to return in case the condition evaluates false.
Result sequence element type.
Type: IQueryable<TResult>
Either of the two input sequences based on the result of evaluating the condition.
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).