Table of Contents

Class ExpressionExtensions

Namespace
NMF.Expressions.Linq
Assembly
NMF.Expressions.Linq.dll

Defines a set of extension methods on the INotifyValue monad

public static class ExpressionExtensions
Inheritance
ExpressionExtensions
Inherited Members

Methods

All<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, bool>>)

Gets a value indicating whether all items in the given collection match the given predicate

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAll<>), "CreateExpression", false)]
public static bool All<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, bool>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, bool>>

A custom predicate that is applied to all items in the collection

Returns

bool

True, if all items in the collection match the given predicate

Type Parameters

TSource

The type of the elements in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Any<TSource>(IEnumerableExpression<TSource>)

Gets a value indicating whether there is any item in the source collection

[ObservableProxy(typeof(ObservableAny<>), "CreateExpression", false)]
public static bool Any<TSource>(this IEnumerableExpression<TSource> source)

Parameters

source IEnumerableExpression<TSource>

The source collection

Returns

bool

True, if the collection has an item, otherwise false

Type Parameters

TSource

The type of the elements in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Any<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, bool>>)

Gets a value indicating whether there is any item in the source collection that matches the given predicate

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableLambdaAny<>), "CreateExpression", false)]
public static bool Any<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, bool>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, bool>>

A custom predicate that is checked for every item

Returns

bool

True, if there is an item that matches the givn criteria, otherwise false

Type Parameters

TSource

The type of the elements in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

AsOne<T>(T)

Captures the given element as a collection containing just this element

public static IEnumerableExpression<T> AsOne<T>(this T item)

Parameters

item T

The item

Returns

IEnumerableExpression<T>

A collection expression consisting only of this element

Type Parameters

T

The type of the element

Average(IEnumerableExpression<decimal>)

Gets the average of the given collection of numbers

[ObservableProxy(typeof(ObservableDecimalAverage), "CreateExpression", false)]
public static decimal Average(this IEnumerableExpression<decimal> source)

Parameters

source IEnumerableExpression<decimal>

A collection of numbers

Returns

decimal

The average of the given collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average(IEnumerableExpression<double>)

Gets the average of the given collection of numbers

[ObservableProxy(typeof(ObservableDoubleAverage), "CreateExpression", false)]
public static double Average(this IEnumerableExpression<double> source)

Parameters

source IEnumerableExpression<double>

A collection of numbers

Returns

double

The average of the given collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average(IEnumerableExpression<int>)

Gets the average of the given collection of numbers

[ObservableProxy(typeof(ObservableIntAverage), "CreateExpression", false)]
public static double Average(this IEnumerableExpression<int> source)

Parameters

source IEnumerableExpression<int>

A collection of numbers

Returns

double

The average of the given collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average(IEnumerableExpression<long>)

Gets the average of the given collection of numbers

[ObservableProxy(typeof(ObservableLongAverage), "CreateExpression", false)]
public static double Average(this IEnumerableExpression<long> source)

Parameters

source IEnumerableExpression<long>

A collection of numbers

Returns

double

The average of the given collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average(IEnumerableExpression<decimal?>)

Gets the average of the given collection of numbers

[ObservableProxy(typeof(ObservableNullableDecimalAverage), "CreateExpression", false)]
public static decimal? Average(this IEnumerableExpression<decimal?> source)

Parameters

source IEnumerableExpression<decimal?>

A collection of numbers

Returns

decimal?

The average of the given collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average(IEnumerableExpression<double?>)

Gets the average of the given collection of numbers

[ObservableProxy(typeof(ObservableNullableDoubleAverage), "CreateExpression", false)]
public static double? Average(this IEnumerableExpression<double?> source)

Parameters

source IEnumerableExpression<double?>

A collection of numbers

Returns

double?

The average of the given collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average(IEnumerableExpression<int?>)

Gets the average of the given collection of numbers

[ObservableProxy(typeof(ObservableNullableIntAverage), "CreateExpression", false)]
public static double? Average(this IEnumerableExpression<int?> source)

Parameters

source IEnumerableExpression<int?>

A collection of numbers

Returns

double?

The average of the given collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average(IEnumerableExpression<long?>)

Gets the average of the given collection of numbers

[ObservableProxy(typeof(ObservableNullableLongAverage), "CreateExpression", false)]
public static double? Average(this IEnumerableExpression<long?> source)

Parameters

source IEnumerableExpression<long?>

A collection of numbers

Returns

double?

The average of the given collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average(IEnumerableExpression<float?>)

Gets the average of the given collection of numbers

[ObservableProxy(typeof(ObservableNullableFloatAverage), "CreateExpression", false)]
public static float? Average(this IEnumerableExpression<float?> source)

Parameters

source IEnumerableExpression<float?>

A collection of numbers

Returns

float?

The average of the given collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average(IEnumerableExpression<float>)

Gets the average of the given collection of numbers

[ObservableProxy(typeof(ObservableFloatAverage), "CreateExpression", false)]
public static float Average(this IEnumerableExpression<float> source)

Parameters

source IEnumerableExpression<float>

A collection of numbers

Returns

float

The average of the given collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, decimal>>)

Gets the average of the given feature based on items of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAverage), "CreateDecimalExpression", false)]
public static decimal Average<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, decimal>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, decimal>>

The feature of the source items that should be averaged

Returns

decimal

Type Parameters

TSource

The type of the items in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, double>>)

Gets the average of the given feature based on items of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAverage), "CreateDoubleExpression", false)]
public static double Average<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, double>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, double>>

The feature of the source items that should be averaged

Returns

double

Type Parameters

TSource

The type of the items in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, int>>)

Gets the average of the given feature based on items of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAverage), "CreateIntExpression", false)]
public static double Average<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, int>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, int>>

The feature of the source items that should be averaged

Returns

double

Type Parameters

TSource

The type of the items in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, long>>)

Gets the average of the given feature based on items of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAverage), "CreateLongExpression", false)]
public static double Average<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, long>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, long>>

The feature of the source items that should be averaged

Returns

double

Type Parameters

TSource

The type of the items in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, decimal?>>)

Gets the average of the given feature based on items of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAverage), "CreateNullableDecimalExpression", false)]
public static decimal? Average<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, decimal?>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, decimal?>>

The feature of the source items that should be averaged

Returns

decimal?

Type Parameters

TSource

The type of the items in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, double?>>)

Gets the average of the given feature based on items of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAverage), "CreateNullableDoubleExpression", false)]
public static double? Average<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, double?>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, double?>>

The feature of the source items that should be averaged

Returns

double?

Type Parameters

TSource

The type of the items in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, int?>>)

Gets the average of the given feature based on items of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAverage), "CreateNullableIntExpression", false)]
public static double? Average<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, int?>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, int?>>

The feature of the source items that should be averaged

Returns

double?

Type Parameters

TSource

The type of the items in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, long?>>)

Gets the average of the given feature based on items of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAverage), "CreateNullableLongExpression", false)]
public static double? Average<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, long?>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, long?>>

The feature of the source items that should be averaged

Returns

double?

Type Parameters

TSource

The type of the items in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, float?>>)

Gets the average of the given feature based on items of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAverage), "CreateNullableFloatExpression", false)]
public static float? Average<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, float?>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, float?>>

The feature of the source items that should be averaged

Returns

float?

Type Parameters

TSource

The type of the items in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Average<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, float>>)

Gets the average of the given feature based on items of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableAverage), "CreateFloatExpression", false)]
public static float Average<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, float>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, float>>

The feature of the source items that should be averaged

Returns

float

Type Parameters

TSource

The type of the items in the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Cast<TResult>(IEnumerableExpression)

Casts the given notifying enumerable to the given type

public static IEnumerableExpression<TResult> Cast<TResult>(this IEnumerableExpression source)

Parameters

source IEnumerableExpression

The source collection

Returns

IEnumerableExpression<TResult>

A notifying collection casted to the given type

Type Parameters

TResult

The true type of the items in the collection

Remarks

If any item in the source collection is not of type TResult, an exception is thrown. Consider using OfType<TResult>(IEnumerableExpression) in this scenario.

Concat<TSource>(IEnumerableExpression<TSource>, IEnumerable<TSource>)

Concats the given notifying enumerables

public static IEnumerableExpression<TSource> Concat<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> source2)

Parameters

source IEnumerableExpression<TSource>

The first source

source2 IEnumerable<TSource>

The second source

Returns

IEnumerableExpression<TSource>

The concatenation of both sources

Type Parameters

TSource

The type of the items

Remarks

The second collection does not have to be a notifying collection, but if it is not, it must not change its contents.

Contains<TSource>(IEnumerableExpression<TSource>, TSource)

Searches the given collection for the given item

[ObservableProxy(typeof(ObservableContains<>), "CreateExpression", false)]
public static bool Contains<TSource>(this IEnumerableExpression<TSource> source, TSource item)

Parameters

source IEnumerableExpression<TSource>

The source collection

item TSource

The item that needs to be checked

Returns

bool

True, if the given source collection contains the provided item, otherwise false

Type Parameters

TSource

The element type of the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Contains<TSource>(IEnumerableExpression<TSource>, TSource, IEqualityComparer<TSource>)

Searches the given collection for the given item

[ObservableProxy(typeof(ObservableContains<>), "CreateExpressionWithComparer", false)]
public static bool Contains<TSource>(this IEnumerableExpression<TSource> source, TSource item, IEqualityComparer<TSource> comparer)

Parameters

source IEnumerableExpression<TSource>

The source collection

item TSource

The item that needs to be checked

comparer IEqualityComparer<TSource>

The equality comparer to decide whether items are equal. Can be omitted

Returns

bool

True, if the given source collection contains the provided item, otherwise false

Type Parameters

TSource

The element type of the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Count<TSource>(IEnumerableExpression<TSource>)

Returns how many items are in the source collection

[ObservableProxy(typeof(ObservableCount<>), "CreateExpression", false)]
public static int Count<TSource>(this IEnumerableExpression<TSource> source)

Parameters

source IEnumerableExpression<TSource>

The source collection

Returns

int

The amount of elements in the source collection

Type Parameters

TSource

The type of elements within the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Count<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, bool>>)

Returns how many items are in the source collection that match the given predicate

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableCount<>), "CreateExpressionWithComparer", false)]
public static int Count<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, bool>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, bool>>

The predicate that is to be checked for each item

Returns

int

The amount of elements in the source collection that match the given predicate

Type Parameters

TSource

The type of elements within the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Distinct<TSource>(IEnumerableExpression<TSource>)

Eliminates duplicates from the given collection

public static IEnumerableExpression<TSource> Distinct<TSource>(this IEnumerableExpression<TSource> source)

Parameters

source IEnumerableExpression<TSource>

The source collection

Returns

IEnumerableExpression<TSource>

A notifying collection with no duplicates

Type Parameters

TSource

The element type of the source collection

Remarks

This method destroys the original order of the items

Distinct<TSource>(IEnumerableExpression<TSource>, IEqualityComparer<TSource>)

Eliminates duplicates from the given collection

public static IEnumerableExpression<TSource> Distinct<TSource>(this IEnumerableExpression<TSource> source, IEqualityComparer<TSource> comparer)

Parameters

source IEnumerableExpression<TSource>

The source collection

comparer IEqualityComparer<TSource>

The comparer to decide whether items match

Returns

IEnumerableExpression<TSource>

A notifying collection with no duplicates

Type Parameters

TSource

The element type of the source collection

Remarks

This method destroys the original order of the items

Except<TSource>(IEnumerableExpression<TSource>, IEnumerable<TSource>)

Returns the given source collection without the elements from the second collection

public static IEnumerableExpression<TSource> Except<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> exceptions)

Parameters

source IEnumerableExpression<TSource>

The source collection

exceptions IEnumerable<TSource>

The exceptions. Can be a static collection, but in that case must not change

Returns

IEnumerableExpression<TSource>

The source collection without the exceptions

Type Parameters

TSource

The type of the items

Remarks

If the exceptions collection will ever change, it must implement ICollectionExpression, otherwise the implementation will get corrupted.

Except<TSource>(IEnumerableExpression<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

Returns the given source collection without the elements from the second collection

public static IEnumerableExpression<TSource> Except<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> exceptions, IEqualityComparer<TSource> comparer)

Parameters

source IEnumerableExpression<TSource>

The source collection

exceptions IEnumerable<TSource>

The exceptions. Can be a static collection, but in that case must not change

comparer IEqualityComparer<TSource>

A comparer to decide whether two items match

Returns

IEnumerableExpression<TSource>

The source collection without the exceptions

Type Parameters

TSource

The type of the items

Remarks

If the exceptions collection will ever change, it must implement ICollectionExpression, otherwise the implementation will get corrupted.

FirstOrDefault<TSource>(IEnumerableExpression<TSource>)

Gets the first item of the given source collection or the item type default value, if the collection is empty

[ObservableProxy(typeof(ObservableFirstOrDefault<>), "CreateExpression", false)]
[SetExpressionRewriter(typeof(ObservableFirstOrDefault<>), "CreateSetExpression")]
public static TSource FirstOrDefault<TSource>(this IEnumerableExpression<TSource> source)

Parameters

source IEnumerableExpression<TSource>

The source collection

Returns

TSource

The first item of the collection or the type default value, if the collection is empty

Type Parameters

TSource

The element type of the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

FirstOrDefault<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, bool>>)

Gets the first item of the given source collection that matches the given predicate or the item type default value, if the collection is empty or no item matches the given predicate

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableFirstOrDefault<>), "CreateExpressionForPredicate", false)]
[SetExpressionRewriter(typeof(ObservableFirstOrDefault<>), "CreateSetExpressionWithPredicate")]
public static TSource FirstOrDefault<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, bool>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, bool>>

The filter predicate

Returns

TSource

The first item of the collection that matches the predicate or the type default value

Type Parameters

TSource

The element type of the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

GroupBy<TSource, TKey>(IEnumerableExpression<TSource>, Expression<Func<TSource, TKey>>)

Groups the given collection by the given predicate

[ParameterDataflow(1, 0, 0)]
public static IEnumerableExpression<IGroupingExpression<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TKey>> keySelector)

Parameters

source IEnumerableExpression<TSource>

The source collection

keySelector Expression<Func<TSource, TKey>>

The predicate expression selecting the keys for grouping

Returns

IEnumerableExpression<IGroupingExpression<TKey, TSource>>

A collection of groups

Type Parameters

TSource

The element type of the source collection

TKey

The type of keys used for grouping

GroupBy<TSource, TKey>(IEnumerableExpression<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>)

Groups the given collection by the given predicate

[ParameterDataflow(1, 0, 0)]
public static IEnumerableExpression<IGroupingExpression<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey> comparer)

Parameters

source IEnumerableExpression<TSource>

The source collection

keySelector Expression<Func<TSource, TKey>>

The predicate expression selecting the keys for grouping

comparer IEqualityComparer<TKey>

A comparer that decides whether items are identical

Returns

IEnumerableExpression<IGroupingExpression<TKey, TSource>>

A collection of groups

Type Parameters

TSource

The element type of the source collection

TKey

The type of keys used for grouping

GroupBy<TSource, TKey, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>)

Groups the given collection by the given predicate into the given result

[ParameterDataflow(1, 0, 0)]
[ParameterDataflow(2, 0, 1)]
[ParameterDataflow(2, 1, 0)]
public static IEnumerableExpression<TResult> GroupBy<TSource, TKey, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector)

Parameters

source IEnumerableExpression<TSource>

The source collection

keySelector Expression<Func<TSource, TKey>>

The predicate expression selecting the keys for grouping

resultSelector Expression<Func<TKey, IEnumerable<TSource>, TResult>>

A function to get the result element for a group

Returns

IEnumerableExpression<TResult>

A collection of groups

Type Parameters

TSource

The element type of the source collection

TKey

The type of keys used for grouping

TResult

The type of the result

GroupBy<TSource, TKey, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, IEqualityComparer<TKey>)

Groups the given collection by the given predicate into the given result

[ParameterDataflow(1, 0, 0)]
[ParameterDataflow(2, 0, 1)]
[ParameterDataflow(2, 1, 0)]
public static IEnumerableExpression<TResult> GroupBy<TSource, TKey, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector, IEqualityComparer<TKey> comparer)

Parameters

source IEnumerableExpression<TSource>

The source collection

keySelector Expression<Func<TSource, TKey>>

The predicate expression selecting the keys for grouping

resultSelector Expression<Func<TKey, IEnumerable<TSource>, TResult>>

A function to get the result element for a group

comparer IEqualityComparer<TKey>

A comparer that decides whether items are identical

Returns

IEnumerableExpression<TResult>

A collection of groups

Type Parameters

TSource

The element type of the source collection

TKey

The type of keys used for grouping

TResult

The type of the result

GroupJoin<TOuter, TInner, TKey, TResult>(IEnumerableExpression<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>)

Joins the given collections based on keys into groups

[ParameterDataflow(2, 0, 0)]
[ParameterDataflow(3, 0, 1)]
[ParameterDataflow(4, 0, 0)]
[ParameterDataflow(4, 1, 1)]
public static IEnumerableExpression<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IEnumerableExpression<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector)

Parameters

outer IEnumerableExpression<TOuter>

The outer collection

inner IEnumerable<TInner>

The inner collection

outerKeySelector Expression<Func<TOuter, TKey>>

A predicate that returns the key for each outer item

innerKeySelector Expression<Func<TInner, TKey>>

A predicate that returns the key for each inner item

resultSelector Expression<Func<TOuter, IEnumerable<TInner>, TResult>>

A function that creates a result for each group of an outer item and a group of inner items

Returns

IEnumerableExpression<TResult>

A collection of grouped results

Type Parameters

TOuter

The element type of the outer collection

TInner

The element type of the inner collection

TKey

The key type to be matched

TResult

The resulting type

GroupJoin<TOuter, TInner, TKey, TResult>(IEnumerableExpression<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>, IEqualityComparer<TKey>)

Joins the given collections based on keys into groups

[ParameterDataflow(2, 0, 0)]
[ParameterDataflow(3, 0, 1)]
[ParameterDataflow(4, 0, 0)]
[ParameterDataflow(4, 1, 1)]
public static IEnumerableExpression<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IEnumerableExpression<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector, IEqualityComparer<TKey> comparer)

Parameters

outer IEnumerableExpression<TOuter>

The outer collection

inner IEnumerable<TInner>

The inner collection

outerKeySelector Expression<Func<TOuter, TKey>>

A predicate that returns the key for each outer item

innerKeySelector Expression<Func<TInner, TKey>>

A predicate that returns the key for each inner item

resultSelector Expression<Func<TOuter, IEnumerable<TInner>, TResult>>

A function that creates a result for each group of an outer item and a group of inner items

comparer IEqualityComparer<TKey>

A comparer to decide when two items are equal

Returns

IEnumerableExpression<TResult>

A collection of grouped results

Type Parameters

TOuter

The element type of the outer collection

TInner

The element type of the inner collection

TKey

The key type to be matched

TResult

The resulting type

Intersect<TSource>(IEnumerableExpression<TSource>, IEnumerable<TSource>)

Intersects two collections

public static IEnumerableExpression<TSource> Intersect<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> source2)

Parameters

source IEnumerableExpression<TSource>

The first collection

source2 IEnumerable<TSource>

The second collection

Returns

IEnumerableExpression<TSource>

The intersection of both collections

Type Parameters

TSource

The element type of the collections

Remarks

No deduplication is done

Intersect<TSource>(IEnumerableExpression<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

Intersects two collections

public static IEnumerableExpression<TSource> Intersect<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> source2, IEqualityComparer<TSource> comparer)

Parameters

source IEnumerableExpression<TSource>

The first collection

source2 IEnumerable<TSource>

The second collection

comparer IEqualityComparer<TSource>

A comparer to decide when two items are equal

Returns

IEnumerableExpression<TSource>

The intersection of both collections

Type Parameters

TSource

The element type of the collections

Remarks

No deduplication is done

IsProperSubsetOf<T>(IEnumerableExpression<T>, IEnumerable<T>)

Gets a value indicating whether the given collection is a proper subset of the current collection

[ObservableProxy(typeof(ObservableProperSubsetOf<>), "CreateExpression", false)]
public static bool IsProperSubsetOf<T>(this IEnumerableExpression<T> source, IEnumerable<T> other)

Parameters

source IEnumerableExpression<T>

The source collection

other IEnumerable<T>

The collection that is compared to

Returns

bool

True, if all elements of the current collection are contained in the given collection but not inverse, otherwise False

Type Parameters

T

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

IsProperSubsetOf<T>(IEnumerableExpression<T>, IEnumerable<T>, IEqualityComparer<T>)

Gets a value indicating whether the given collection is a proper subset of the current collection

[ObservableProxy(typeof(ObservableProperSubsetOf<>), "CreateExpressionWithComparer", false)]
public static bool IsProperSubsetOf<T>(this IEnumerableExpression<T> source, IEnumerable<T> other, IEqualityComparer<T> comparer)

Parameters

source IEnumerableExpression<T>

The source collection

other IEnumerable<T>

The collection that is compared to

comparer IEqualityComparer<T>

The comparer to define equality

Returns

bool

True, if all elements of the current collection are contained in the given collection but not inverse, otherwise False

Type Parameters

T

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

IsProperSupersetOf<T>(IEnumerableExpression<T>, IEnumerable<T>)

Gets a value indicating whether the given collection is a proper superset of the current collection

[ObservableProxy(typeof(ObservableProperSupersetOf<>), "CreateExpression", false)]
public static bool IsProperSupersetOf<T>(this IEnumerableExpression<T> source, IEnumerable<T> other)

Parameters

source IEnumerableExpression<T>

The source collection

other IEnumerable<T>

The collection that is compared to

Returns

bool

True, if all elements of the given collection are contained in the current collection but not inverse, otherwise False

Type Parameters

T

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

IsProperSupersetOf<T>(IEnumerableExpression<T>, IEnumerable<T>, IEqualityComparer<T>)

Gets a value indicating whether the given collection is a proper superset of the current collection

[ObservableProxy(typeof(ObservableProperSupersetOf<>), "CreateExpressionWithComparer", false)]
public static bool IsProperSupersetOf<T>(this IEnumerableExpression<T> source, IEnumerable<T> other, IEqualityComparer<T> comparer)

Parameters

source IEnumerableExpression<T>

The source collection

other IEnumerable<T>

The collection that is compared to

comparer IEqualityComparer<T>

The comparer to define equality

Returns

bool

True, if all elements of the given collection are contained in the current collection but not inverse, otherwise False

Type Parameters

T

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

IsSubsetOf<T>(IEnumerableExpression<T>, IEnumerable<T>)

Gets a value indicating whether the given collection is a proper subset of the current collection

[ObservableProxy(typeof(ObservableSubsetOf<>), "CreateExpression", false)]
public static bool IsSubsetOf<T>(this IEnumerableExpression<T> source, IEnumerable<T> other)

Parameters

source IEnumerableExpression<T>

The source collection

other IEnumerable<T>

The collection that is compared to

Returns

bool

True, if all elements of the current collection are contained in the given collection, otherwise False

Type Parameters

T

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

IsSubsetOf<T>(IEnumerableExpression<T>, IEnumerable<T>, IEqualityComparer<T>)

Gets a value indicating whether the given collection is a proper subset of the current collection

[ObservableProxy(typeof(ObservableSubsetOf<>), "CreateExpressionWithComparer", false)]
public static bool IsSubsetOf<T>(this IEnumerableExpression<T> source, IEnumerable<T> other, IEqualityComparer<T> comparer)

Parameters

source IEnumerableExpression<T>

The source collection

other IEnumerable<T>

The collection that is compared to

comparer IEqualityComparer<T>

The comparer to define equality

Returns

bool

True, if all elements of the current collection are contained in the given collection, otherwise False

Type Parameters

T

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

IsSupersetOf<T>(IEnumerableExpression<T>, IEnumerable<T>)

Gets a value indicating whether the given collection is a proper superset of the current collection

[ObservableProxy(typeof(ObservableSupersetOf<>), "CreateExpression", false)]
public static bool IsSupersetOf<T>(this IEnumerableExpression<T> source, IEnumerable<T> other)

Parameters

source IEnumerableExpression<T>

The source collection

other IEnumerable<T>

The collection that is compared to

Returns

bool

True, if all elements of the given collection are contained in the current collection, otherwise False

Type Parameters

T

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

IsSupersetOf<T>(IEnumerableExpression<T>, IEnumerable<T>, IEqualityComparer<T>)

Gets a value indicating whether the given collection is a proper superset of the current collection

[ObservableProxy(typeof(ObservableSupersetOf<>), "CreateExpressionWithComparer", false)]
public static bool IsSupersetOf<T>(this IEnumerableExpression<T> source, IEnumerable<T> other, IEqualityComparer<T> comparer)

Parameters

source IEnumerableExpression<T>

The source collection

other IEnumerable<T>

The collection that is compared to

comparer IEqualityComparer<T>

The comparer to define equality

Returns

bool

True, if all elements of the given collection are contained in the current collection, otherwise False

Type Parameters

T

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Join<TOuter, TInner, TKey, TResult>(IEnumerableExpression<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>)

Joins the current collection with the given other collection

[ParameterDataflow(2, 0, 0)]
[ParameterDataflow(3, 0, 1)]
[ParameterDataflow(4, 0, 0)]
[ParameterDataflow(4, 1, 1)]
public static IEnumerableExpression<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerableExpression<TOuter> outerSource, IEnumerable<TInner> innerSource, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector)

Parameters

outerSource IEnumerableExpression<TOuter>

The current collection

innerSource IEnumerable<TInner>

The other collection to join with

outerKeySelector Expression<Func<TOuter, TKey>>

A lambda expression to select the key for the current collections items

innerKeySelector Expression<Func<TInner, TKey>>

A lambda expression to select the key for the given other collections items

resultSelector Expression<Func<TOuter, TInner, TResult>>

A lambda expression to select the result for a given pair of elements

Returns

IEnumerableExpression<TResult>

A joined collection

Type Parameters

TOuter

The element type of the current collection

TInner

The element type of the other collection

TKey

The type of the keys for which the collections should be joined

TResult

The join result type

Join<TOuter, TInner, TKey, TResult>(IEnumerableExpression<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>, IEqualityComparer<TKey>)

Joins the current collection with the given other collection

[ParameterDataflow(2, 0, 0)]
[ParameterDataflow(3, 0, 1)]
[ParameterDataflow(4, 0, 0)]
[ParameterDataflow(4, 1, 1)]
public static IEnumerableExpression<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerableExpression<TOuter> outerSource, IEnumerable<TInner> innerSource, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector, IEqualityComparer<TKey> comparer)

Parameters

outerSource IEnumerableExpression<TOuter>

The current collection

innerSource IEnumerable<TInner>

The other collection to join with

outerKeySelector Expression<Func<TOuter, TKey>>

A lambda expression to select the key for the current collections items

innerKeySelector Expression<Func<TInner, TKey>>

A lambda expression to select the key for the given other collections items

resultSelector Expression<Func<TOuter, TInner, TResult>>

A lambda expression to select the result for a given pair of elements

comparer IEqualityComparer<TKey>

An equality comparer to define when two keys are equivalent

Returns

IEnumerableExpression<TResult>

A joined collection

Type Parameters

TOuter

The element type of the current collection

TInner

The element type of the other collection

TKey

The type of the keys for which the collections should be joined

TResult

The join result type

Max<TSource>(IEnumerableExpression<TSource?>)

Gets the maximum element of the given collection

[ObservableProxy(typeof(ObservableComparisons), "NullableMaxExpression", false)]
public static TSource? Max<TSource>(this IEnumerableExpression<TSource?> source) where TSource : struct, IComparable<TSource>

Parameters

source IEnumerableExpression<TSource?>

The collection

Returns

TSource?

An element which is maximal

Type Parameters

TSource

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Max<TSource>(IEnumerableExpression<TSource?>, IComparer<TSource>)

Gets the maximum element of the given collection

[ObservableProxy(typeof(ObservableComparisons), "NullableMaxExpressionWithComparer", false)]
public static TSource? Max<TSource>(this IEnumerableExpression<TSource?> source, IComparer<TSource> comparer) where TSource : struct

Parameters

source IEnumerableExpression<TSource?>

The collection

comparer IComparer<TSource>

A comparer for custom comparison

Returns

TSource?

An element which is maximal

Type Parameters

TSource

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Max<TSource>(IEnumerableExpression<TSource>)

Gets the maximum element of the given collection

[ObservableProxy(typeof(ObservableComparisons), "MaxExpression", false)]
public static TSource Max<TSource>(this IEnumerableExpression<TSource> source) where TSource : IComparable<TSource>

Parameters

source IEnumerableExpression<TSource>

The collection

Returns

TSource

An element which is maximal

Type Parameters

TSource

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Max<TSource>(IEnumerableExpression<TSource>, IComparer<TSource>)

Gets the maximum element of the given collection

[ObservableProxy(typeof(ObservableComparisons), "MaxExpressionWithComparer", false)]
public static TSource Max<TSource>(this IEnumerableExpression<TSource> source, IComparer<TSource> comparer)

Parameters

source IEnumerableExpression<TSource>

The collection

comparer IComparer<TSource>

A comparer for custom comparison

Returns

TSource

An element which is maximal

Type Parameters

TSource

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Max<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult?>>)

Gets the maximum feature of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableComparisons), "LambdaNullableMaxExpression", false)]
public static TResult? Max<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult?>> selector) where TResult : struct, IComparable<TResult>

Parameters

source IEnumerableExpression<TSource>

The collection

selector Expression<Func<TSource, TResult?>>

A lambda expression to obtain the elements feature in quest

Returns

TResult?

An elements feature which is maximal

Type Parameters

TSource

The element type

TResult

The type of the comparison

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Max<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult?>>, IComparer<TResult>)

Gets the maximum feature of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableComparisons), "LambdaNullableMaxExpressionWithComparer", false)]
public static TResult? Max<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult?>> selector, IComparer<TResult> comparer) where TResult : struct

Parameters

source IEnumerableExpression<TSource>

The collection

selector Expression<Func<TSource, TResult?>>

A lambda expression to obtain the elements feature in quest

comparer IComparer<TResult>

A comparer for custom comparison

Returns

TResult?

An elements feature which is maximal

Type Parameters

TSource

The element type

TResult

The type of the comparison

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Max<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult>>)

Gets the maximum feature of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableComparisons), "LambdaMaxExpression", false)]
[ExpressionCompileRewriter(typeof(ExpressionExtensions.Rewrites), "LambdaMaxRewrite")]
public static TResult Max<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult>> selector) where TResult : IComparable<TResult>

Parameters

source IEnumerableExpression<TSource>

The collection

selector Expression<Func<TSource, TResult>>

A lambda expression to obtain the elements feature in quest

Returns

TResult

An elements feature which is maximal

Type Parameters

TSource

The element type

TResult

The type of the comparison

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Max<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult>>, IComparer<TResult>)

Gets the maximum feature of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableComparisons), "LambdaMaxExpressionWithComparer", false)]
public static TResult Max<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult>> selector, IComparer<TResult> comparer)

Parameters

source IEnumerableExpression<TSource>

The collection

selector Expression<Func<TSource, TResult>>

A lambda expression to obtain the elements feature in quest

comparer IComparer<TResult>

A comparer for custom comparison

Returns

TResult

An elements feature which is maximal

Type Parameters

TSource

The element type

TResult

The type of the comparison

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Max<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult>>, Func<TSource, TResult>)

Gets the maximum feature of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableComparisons), "LambdaMaxExpressionCompiled", false)]
public static TResult Max<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult>> selector, Func<TSource, TResult> selectorCompiled) where TResult : IComparable<TResult>

Parameters

source IEnumerableExpression<TSource>

The collection

selector Expression<Func<TSource, TResult>>

A lambda expression to obtain the elements feature in quest

selectorCompiled Func<TSource, TResult>

A compiled version of the selector

Returns

TResult

An elements feature which is maximal

Type Parameters

TSource

The element type

TResult

The type of the comparison

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Min<TSource>(IEnumerableExpression<TSource?>)

Gets the minimum element of the given collection

[ObservableProxy(typeof(ObservableComparisons), "NullableMinExpression", false)]
public static TSource? Min<TSource>(this IEnumerableExpression<TSource?> source) where TSource : struct, IComparable<TSource>

Parameters

source IEnumerableExpression<TSource?>

The collection

Returns

TSource?

An element which is minimal

Type Parameters

TSource

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Min<TSource>(IEnumerableExpression<TSource?>, IComparer<TSource>)

Gets the minimum element of the given collection

[ObservableProxy(typeof(ObservableComparisons), "NullableMinExpressionWithComparer", false)]
public static TSource? Min<TSource>(this IEnumerableExpression<TSource?> source, IComparer<TSource> comparer) where TSource : struct

Parameters

source IEnumerableExpression<TSource?>

The collection

comparer IComparer<TSource>

A comparer for custom comparison

Returns

TSource?

An element which is minimal

Type Parameters

TSource

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Min<TSource>(IEnumerableExpression<TSource>)

Gets the minimum element of the given collection

[ObservableProxy(typeof(ObservableComparisons), "MinExpression", false)]
public static TSource Min<TSource>(this IEnumerableExpression<TSource> source) where TSource : IComparable<TSource>

Parameters

source IEnumerableExpression<TSource>

The collection

Returns

TSource

An element which is minimal

Type Parameters

TSource

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Min<TSource>(IEnumerableExpression<TSource>, IComparer<TSource>)

Gets the minimum element of the given collection

[ObservableProxy(typeof(ObservableComparisons), "MinExpressionWithComparer", false)]
public static TSource Min<TSource>(this IEnumerableExpression<TSource> source, IComparer<TSource> comparer)

Parameters

source IEnumerableExpression<TSource>

The collection

comparer IComparer<TSource>

A comparer for custom comparison

Returns

TSource

An element which is minimal

Type Parameters

TSource

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Min<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult?>>)

Gets the minimum feature of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableComparisons), "LambdaNullableMinExpression", false)]
public static TResult? Min<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult?>> selector) where TResult : struct, IComparable<TResult>

Parameters

source IEnumerableExpression<TSource>

The collection

selector Expression<Func<TSource, TResult?>>

A lambda expression to obtain the elements feature in quest

Returns

TResult?

An elements feature which is minimal

Type Parameters

TSource

The element type

TResult

The type of the comparison

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Min<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult?>>, IComparer<TResult>)

Gets the minimum feature of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableComparisons), "LambdaNullableMinExpressionWithComparer", false)]
public static TResult? Min<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult?>> selector, IComparer<TResult> comparer) where TResult : struct

Parameters

source IEnumerableExpression<TSource>

The collection

selector Expression<Func<TSource, TResult?>>

A lambda expression to obtain the elements feature in quest

comparer IComparer<TResult>

A comparer for custom comparison

Returns

TResult?

An elements feature which is minimal

Type Parameters

TSource

The element type

TResult

The type of the comparison

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Min<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult>>)

Gets the minimum feature of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableComparisons), "LambdaMinExpression", false)]
public static TResult Min<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult>> selector) where TResult : IComparable<TResult>

Parameters

source IEnumerableExpression<TSource>

The collection

selector Expression<Func<TSource, TResult>>

A lambda expression to obtain the elements feature in quest

Returns

TResult

An elements feature which is minimal

Type Parameters

TSource

The element type

TResult

The type of the comparison

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Min<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult>>, IComparer<TResult>)

Gets the minimum feature of the given collection

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableComparisons), "LambdaMinExpressionWithComparer", false)]
public static TResult Min<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult>> selector, IComparer<TResult> comparer)

Parameters

source IEnumerableExpression<TSource>

The collection

selector Expression<Func<TSource, TResult>>

A lambda expression to obtain the elements feature in quest

comparer IComparer<TResult>

A comparer for custom comparison

Returns

TResult

An elements feature which is minimal

Type Parameters

TSource

The element type

TResult

The type of the comparison

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

OfType<TResult>(ICollectionExpression)

Filters the given collection for elements of the given type as a collection using the non-generic interface

public static ICollectionExpression<TResult> OfType<TResult>(this ICollectionExpression source)

Parameters

source ICollectionExpression

The current collection

Returns

ICollectionExpression<TResult>

A collection containing the elements of the given type

Type Parameters

TResult

The result type

Remarks

Only use this method if a generic collection interface is for some reason unavailable.

OfType<TResult>(IEnumerableExpression)

Filters the given collection for elements of the given type

public static IEnumerableExpression<TResult> OfType<TResult>(this IEnumerableExpression source)

Parameters

source IEnumerableExpression

The current collection

Returns

IEnumerableExpression<TResult>

A collection containing the elements of the given type

Type Parameters

TResult

The result type

OfType<TSource, TResult>(ICollectionExpression<TSource>)

Filters the given collection for elements of the given type

public static ICollectionExpression<TResult> OfType<TSource, TResult>(this ICollectionExpression<TSource> source) where TResult : TSource

Parameters

source ICollectionExpression<TSource>

The current collection

Returns

ICollectionExpression<TResult>

A collection containing the elements of the given type

Type Parameters

TSource

The type of the original collection

TResult

The result type

OrderByDescending<TItem, TKey>(IEnumerableExpression<TItem>, Expression<Func<TItem, TKey>>)

Orders the given collection descending by the given predicate

[ParameterDataflow(1, 0, 0)]
public static IOrderableEnumerableExpression<TItem> OrderByDescending<TItem, TKey>(this IEnumerableExpression<TItem> source, Expression<Func<TItem, TKey>> keySelector)

Parameters

source IEnumerableExpression<TItem>

The collection that should be sorted

keySelector Expression<Func<TItem, TKey>>

A lambda expression selecting the sorting keys for the given collection

Returns

IOrderableEnumerableExpression<TItem>

A collection with the elements contained in the current collection sorted by the given predicate

Type Parameters

TItem

The elements type

TKey

The type of the keys used for ordering

OrderByDescending<TItem, TKey>(IEnumerableExpression<TItem>, Expression<Func<TItem, TKey>>, IComparer<TKey>)

Orders the given collection descending by the given predicate

[ParameterDataflow(1, 0, 0)]
public static IOrderableEnumerableExpression<TItem> OrderByDescending<TItem, TKey>(this IEnumerableExpression<TItem> source, Expression<Func<TItem, TKey>> keySelector, IComparer<TKey> comparer)

Parameters

source IEnumerableExpression<TItem>

The collection that should be sorted

keySelector Expression<Func<TItem, TKey>>

A lambda expression selecting the sorting keys for the given collection

comparer IComparer<TKey>

A comparer for custom comparison

Returns

IOrderableEnumerableExpression<TItem>

A collection with the elements contained in the current collection sorted by the given predicate

Type Parameters

TItem

The elements type

TKey

The type of the keys used for ordering

OrderBy<TItem, TKey>(IEnumerableExpression<TItem>, Expression<Func<TItem, TKey>>)

Orders the given collection ascending by the given predicate

[ParameterDataflow(1, 0, 0)]
public static IOrderableEnumerableExpression<TItem> OrderBy<TItem, TKey>(this IEnumerableExpression<TItem> source, Expression<Func<TItem, TKey>> keySelector)

Parameters

source IEnumerableExpression<TItem>

The collection that should be sorted

keySelector Expression<Func<TItem, TKey>>

A lambda expression selecting the sorting keys for the given collection

Returns

IOrderableEnumerableExpression<TItem>

A collection with the elements contained in the current collection sorted by the given predicate

Type Parameters

TItem

The elements type

TKey

The type of the keys used for ordering

OrderBy<TItem, TKey>(IEnumerableExpression<TItem>, Expression<Func<TItem, TKey>>, IComparer<TKey>)

Orders the given collection ascending by the given predicate

[ParameterDataflow(1, 0, 0)]
public static IOrderableEnumerableExpression<TItem> OrderBy<TItem, TKey>(this IEnumerableExpression<TItem> source, Expression<Func<TItem, TKey>> keySelector, IComparer<TKey> comparer)

Parameters

source IEnumerableExpression<TItem>

The collection that should be sorted

keySelector Expression<Func<TItem, TKey>>

A lambda expression selecting the sorting keys for the given collection

comparer IComparer<TKey>

A comparer for custom comparison

Returns

IOrderableEnumerableExpression<TItem>

A collection with the elements contained in the current collection sorted by the given predicate

Type Parameters

TItem

The elements type

TKey

The type of the keys used for ordering

SelectMany<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, IEnumerable<TResult>>>)

Flattens the given collection of collections where the subsequent collections are selected by a predicate

[ParameterDataflow(1, 0, 0)]
public static IEnumerableExpression<TResult> SelectMany<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, IEnumerable<TResult>>> selector)

Parameters

source IEnumerableExpression<TSource>

The current collection

selector Expression<Func<TSource, IEnumerable<TResult>>>

A lambda expression to select subsequent collections

Returns

IEnumerableExpression<TResult>

A collection with the results

Type Parameters

TSource

The source element type

TResult

The result element type

SelectMany<TSource, TIntermediate, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, IEnumerable<TIntermediate>>>, Expression<Func<TSource, TIntermediate, TResult>>)

Flattens the given collection of collections where the subsequent collections are selected by a predicate

[ParameterDataflow(1, 0, 0)]
[ParameterDataflow(2, 0, 0)]
[ParameterDataflow(2, 1, 1)]
public static IEnumerableExpression<TResult> SelectMany<TSource, TIntermediate, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, IEnumerable<TIntermediate>>> func, Expression<Func<TSource, TIntermediate, TResult>> selector)

Parameters

source IEnumerableExpression<TSource>

The current collection

func Expression<Func<TSource, IEnumerable<TIntermediate>>>

A lambda expression to select subsequent collections

selector Expression<Func<TSource, TIntermediate, TResult>>

A lambda expression that determines the result element given the element of the source collection and the element of the subsequent collection

Returns

IEnumerableExpression<TResult>

A collection with the results

Type Parameters

TSource

The source element type

TIntermediate

The element type of the subsequent collection

TResult

The result element type

Select<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult>>)

Maps the current collection to the given lambda expression

[ParameterDataflow(1, 0, 0)]
[ExpressionCompileRewriter(typeof(ExpressionExtensions.Rewrites), "RewriteSelect")]
public static IEnumerableExpression<TResult> Select<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult>> selector)

Parameters

source IEnumerableExpression<TSource>

The current collection

selector Expression<Func<TSource, TResult>>

A lambda expression representing the mapping result for a given item

Returns

IEnumerableExpression<TResult>

A collection with the mapping results

Type Parameters

TSource

The elements type

TResult

The result element type

Select<TSource, TResult>(IEnumerableExpression<TSource>, Expression<Func<TSource, TResult>>, Func<TSource, TResult>)

Maps the current collection to the given lambda expression

[ParameterDataflow(1, 0, 0)]
public static IEnumerableExpression<TResult> Select<TSource, TResult>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, TResult>> selector, Func<TSource, TResult> selectorCompiled)

Parameters

source IEnumerableExpression<TSource>

The current collection

selector Expression<Func<TSource, TResult>>

A lambda expression representing the mapping result for a given item

selectorCompiled Func<TSource, TResult>

A compiled version of the selector

Returns

IEnumerableExpression<TResult>

A collection with the mapping results

Type Parameters

TSource

The elements type

TResult

The result element type

SetEquals<T>(IEnumerableExpression<T>, IEnumerable<T>)

Gets a value indicating whether the current collection and the given collection contain the same set of elements, regardless of their order

[ObservableProxy(typeof(ObservableSetEquals<>), "CreateExpression", false)]
public static bool SetEquals<T>(this IEnumerableExpression<T> source, IEnumerable<T> other)

Parameters

source IEnumerableExpression<T>

The current collection

other IEnumerable<T>

The given other collection

Returns

bool

True, if both collections contain the same set of elements, otherwise False

Type Parameters

T

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

SetEquals<T>(IEnumerableExpression<T>, IEnumerable<T>, IEqualityComparer<T>)

Gets a value indicating whether the current collection and the given collection contain the same set of elements, regardless of their order

[ObservableProxy(typeof(ObservableSetEquals<>), "CreateExpressionWithComparer", false)]
public static bool SetEquals<T>(this IEnumerableExpression<T> source, IEnumerable<T> other, IEqualityComparer<T> comparer)

Parameters

source IEnumerableExpression<T>

The current collection

other IEnumerable<T>

The given other collection

comparer IEqualityComparer<T>

An equality comparer used to determine equality in the sets

Returns

bool

True, if both collections contain the same set of elements, otherwise False

Type Parameters

T

The element type

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

SingleOrDefault<TSource>(IEnumerableExpression<TSource>)

Gets the single item of the given source collection or the item type default value, if the collection is empty

[ObservableProxy(typeof(ObservableSingleOrDefault<>), "CreateExpression", false)]
[SetExpressionRewriter(typeof(ObservableSingleOrDefault<>), "CreateSetExpression")]
public static TSource SingleOrDefault<TSource>(this IEnumerableExpression<TSource> source)

Parameters

source IEnumerableExpression<TSource>

The source collection

Returns

TSource

The single item of the collection or the type default value, if the collection is empty

Type Parameters

TSource

The element type of the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

SingleOrDefault<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, bool>>)

Gets the first item of the given source collection that matches the given predicate or the item type default value, if the collection is empty or no item matches the given predicate

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSingleOrDefault<>), "CreateExpressionForPredicate", false)]
[SetExpressionRewriter(typeof(ObservableSingleOrDefault<>), "CreateSetExpressionWithPredicate")]
[ExpressionCompileRewriter(typeof(ExpressionExtensions.Rewrites), "RewriteSingleOrDefault")]
public static TSource SingleOrDefault<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, bool>> predicate)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, bool>>

The filter predicate

Returns

TSource

The first item of the collection that matches the predicate or the type default value

Type Parameters

TSource

The element type of the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

SingleOrDefault<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, bool>>, Func<TSource, bool>)

Gets the first item of the given source collection that matches the given predicate or the item type default value, if the collection is empty or no item matches the given predicate

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSingleOrDefault<>), "CreateExpressionForPredicate2", false)]
[SetExpressionRewriter(typeof(ObservableSingleOrDefault<>), "CreateSetExpressionWithPredicate2")]
public static TSource SingleOrDefault<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, bool>> predicate, Func<TSource, bool> predicateCompiled)

Parameters

source IEnumerableExpression<TSource>

The source collection

predicate Expression<Func<TSource, bool>>

The filter predicate

predicateCompiled Func<TSource, bool>

The filter predicate precompiled

Returns

TSource

The first item of the collection that matches the predicate or the type default value

Type Parameters

TSource

The element type of the source collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum(IEnumerableExpression<decimal>)

Gets the sum of the current collection

[ObservableProxy(typeof(ObservableSum), "SumDecimalExpression", false)]
public static decimal Sum(this IEnumerableExpression<decimal> source)

Parameters

source IEnumerableExpression<decimal>

The collection of numbers

Returns

decimal

The sum of the numbers contained in this collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum(IEnumerableExpression<double>)

Gets the sum of the current collection

[ObservableProxy(typeof(ObservableSum), "SumDoubleExpression", false)]
public static double Sum(this IEnumerableExpression<double> source)

Parameters

source IEnumerableExpression<double>

The collection of numbers

Returns

double

The sum of the numbers contained in this collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum(IEnumerableExpression<int>)

Gets the sum of the current collection

[ObservableProxy(typeof(ObservableSum), "SumIntExpression", false)]
public static int Sum(this IEnumerableExpression<int> source)

Parameters

source IEnumerableExpression<int>

The collection of numbers

Returns

int

The sum of the numbers contained in this collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum(IEnumerableExpression<long>)

Gets the sum of the current collection

[ObservableProxy(typeof(ObservableSum), "SumLongExpression", false)]
public static long Sum(this IEnumerableExpression<long> source)

Parameters

source IEnumerableExpression<long>

The collection of numbers

Returns

long

The sum of the numbers contained in this collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum(IEnumerableExpression<decimal?>)

Gets the sum of the current collection

[ObservableProxy(typeof(ObservableSum), "SumNullableDecimalExpression", false)]
public static decimal? Sum(this IEnumerableExpression<decimal?> source)

Parameters

source IEnumerableExpression<decimal?>

The collection of numbers

Returns

decimal?

The sum of the numbers contained in this collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum(IEnumerableExpression<double?>)

Gets the sum of the current collection

[ObservableProxy(typeof(ObservableSum), "SumNullableDoubleExpression", false)]
public static double? Sum(this IEnumerableExpression<double?> source)

Parameters

source IEnumerableExpression<double?>

The collection of numbers

Returns

double?

The sum of the numbers contained in this collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum(IEnumerableExpression<int?>)

Gets the sum of the current collection

[ObservableProxy(typeof(ObservableSum), "SumNullableIntExpression", false)]
public static int? Sum(this IEnumerableExpression<int?> source)

Parameters

source IEnumerableExpression<int?>

The collection of numbers

Returns

int?

The sum of the numbers contained in this collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum(IEnumerableExpression<long?>)

Gets the sum of the current collection

[ObservableProxy(typeof(ObservableSum), "SumNullableLongExpression", false)]
public static long? Sum(this IEnumerableExpression<long?> source)

Parameters

source IEnumerableExpression<long?>

The collection of numbers

Returns

long?

The sum of the numbers contained in this collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum(IEnumerableExpression<float?>)

Gets the sum of the current collection

[ObservableProxy(typeof(ObservableSum), "SumNullableFloatExpression", false)]
public static float? Sum(this IEnumerableExpression<float?> source)

Parameters

source IEnumerableExpression<float?>

The collection of numbers

Returns

float?

The sum of the numbers contained in this collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum(IEnumerableExpression<float>)

Gets the sum of the current collection

[ObservableProxy(typeof(ObservableSum), "SumFloatExpression", false)]
public static float Sum(this IEnumerableExpression<float> source)

Parameters

source IEnumerableExpression<float>

The collection of numbers

Returns

float

The sum of the numbers contained in this collection

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, decimal>>)

Gets the sum of the current collections features

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSum), "SumLambdaDecimalExpression", false)]
public static decimal Sum<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, decimal>> selector)

Parameters

source IEnumerableExpression<TSource>

The collection of numbers

selector Expression<Func<TSource, decimal>>

A lambda expression to represent the feature to be summed up

Returns

decimal

The sum of the numbers contained in this collection elements features

Type Parameters

TSource

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, double>>)

Gets the sum of the current collections features

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSum), "SumLambdaDoubleExpression", false)]
public static double Sum<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, double>> selector)

Parameters

source IEnumerableExpression<TSource>

The collection of numbers

selector Expression<Func<TSource, double>>

A lambda expression to represent the feature to be summed up

Returns

double

The sum of the numbers contained in this collection elements features

Type Parameters

TSource

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, int>>)

Gets the sum of the current collections features

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSum), "SumLambdaIntExpression", false)]
public static int Sum<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, int>> selector)

Parameters

source IEnumerableExpression<TSource>

The collection of numbers

selector Expression<Func<TSource, int>>

A lambda expression to represent the feature to be summed up

Returns

int

The sum of the numbers contained in this collection elements features

Type Parameters

TSource

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, long>>)

Gets the sum of the current collections features

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSum), "SumLambdaLongExpression", false)]
public static long Sum<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, long>> selector)

Parameters

source IEnumerableExpression<TSource>

The collection of numbers

selector Expression<Func<TSource, long>>

A lambda expression to represent the feature to be summed up

Returns

long

The sum of the numbers contained in this collection elements features

Type Parameters

TSource

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, decimal?>>)

Gets the sum of the current collections features

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSum), "SumLambdaNullableDecimalExpression", false)]
public static decimal? Sum<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, decimal?>> selector)

Parameters

source IEnumerableExpression<TSource>

The collection of numbers

selector Expression<Func<TSource, decimal?>>

A lambda expression to represent the feature to be summed up

Returns

decimal?

The sum of the numbers contained in this collection elements features

Type Parameters

TSource

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, double?>>)

Gets the sum of the current collections features

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSum), "SumLambdaNullableDoubleExpression", false)]
public static double? Sum<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, double?>> selector)

Parameters

source IEnumerableExpression<TSource>

The collection of numbers

selector Expression<Func<TSource, double?>>

A lambda expression to represent the feature to be summed up

Returns

double?

The sum of the numbers contained in this collection elements features

Type Parameters

TSource

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, int?>>)

Gets the sum of the current collections features

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSum), "SumLambdaNullableIntExpression", false)]
public static int? Sum<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, int?>> selector)

Parameters

source IEnumerableExpression<TSource>

The collection of numbers

selector Expression<Func<TSource, int?>>

A lambda expression to represent the feature to be summed up

Returns

int?

The sum of the numbers contained in this collection elements features

Type Parameters

TSource

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, long?>>)

Gets the sum of the current collections features

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSum), "SumLambdaNullableLongExpression", false)]
public static long? Sum<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, long?>> selector)

Parameters

source IEnumerableExpression<TSource>

The collection of numbers

selector Expression<Func<TSource, long?>>

A lambda expression to represent the feature to be summed up

Returns

long?

The sum of the numbers contained in this collection elements features

Type Parameters

TSource

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, float?>>)

Gets the sum of the current collections features

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSum), "SumLambdaNullableFloatExpression", false)]
public static float? Sum<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, float?>> selector)

Parameters

source IEnumerableExpression<TSource>

The collection of numbers

selector Expression<Func<TSource, float?>>

A lambda expression to represent the feature to be summed up

Returns

float?

The sum of the numbers contained in this collection elements features

Type Parameters

TSource

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

Sum<TSource>(IEnumerableExpression<TSource>, Expression<Func<TSource, float>>)

Gets the sum of the current collections features

[ParameterDataflow(1, 0, 0)]
[ObservableProxy(typeof(ObservableSum), "SumLambdaFloatExpression", false)]
public static float Sum<TSource>(this IEnumerableExpression<TSource> source, Expression<Func<TSource, float>> selector)

Parameters

source IEnumerableExpression<TSource>

The collection of numbers

selector Expression<Func<TSource, float>>

A lambda expression to represent the feature to be summed up

Returns

float

The sum of the numbers contained in this collection elements features

Type Parameters

TSource

Remarks

This method has an observable proxy, i.e. it can be used in a observable expression

ThenByDescending<TItem, TKey>(IOrderableEnumerableExpression<TItem>, Expression<Func<TItem, TKey>>)

Orders the given orderable collection by the given predicate descending

[ParameterDataflow(1, 0, 0)]
public static IOrderableEnumerableExpression<TItem> ThenByDescending<TItem, TKey>(this IOrderableEnumerableExpression<TItem> source, Expression<Func<TItem, TKey>> keySelector)

Parameters

source IOrderableEnumerableExpression<TItem>

The current collection

keySelector Expression<Func<TItem, TKey>>

A lambda expression to select the features used for ordering

Returns

IOrderableEnumerableExpression<TItem>

A collection with the elements of the current collection but ordered in lower priority for the given predicate

Type Parameters

TItem

The elements type

TKey

The ordering key type

ThenByDescending<TItem, TKey>(IOrderableEnumerableExpression<TItem>, Expression<Func<TItem, TKey>>, IComparer<TKey>)

Orders the given orderable collection by the given predicate descending

[ParameterDataflow(1, 0, 0)]
public static IOrderableEnumerableExpression<TItem> ThenByDescending<TItem, TKey>(this IOrderableEnumerableExpression<TItem> source, Expression<Func<TItem, TKey>> keySelector, IComparer<TKey> comparer)

Parameters

source IOrderableEnumerableExpression<TItem>

The current collection

keySelector Expression<Func<TItem, TKey>>

A lambda expression to select the features used for ordering

comparer IComparer<TKey>

A comparer to determine comparison

Returns

IOrderableEnumerableExpression<TItem>

A collection with the elements of the current collection but ordered in lower priority for the given predicate

Type Parameters

TItem

The elements type

TKey

The ordering key type

ThenBy<TItem, TKey>(IOrderableEnumerableExpression<TItem>, Expression<Func<TItem, TKey>>)

Orders the given orderable collection by the given predicate ascending

[ParameterDataflow(1, 0, 0)]
public static IOrderableEnumerableExpression<TItem> ThenBy<TItem, TKey>(this IOrderableEnumerableExpression<TItem> source, Expression<Func<TItem, TKey>> keySelector)

Parameters

source IOrderableEnumerableExpression<TItem>

The current collection

keySelector Expression<Func<TItem, TKey>>

A lambda expression to select the features used for ordering

Returns

IOrderableEnumerableExpression<TItem>

A collection with the elements of the current collection but ordered in lower priority for the given predicate

Type Parameters

TItem

The elements type

TKey

The ordering key type

ThenBy<TItem, TKey>(IOrderableEnumerableExpression<TItem>, Expression<Func<TItem, TKey>>, IComparer<TKey>)

Orders the given orderable collection by the given predicate ascending

[ParameterDataflow(1, 0, 0)]
public static IOrderableEnumerableExpression<TItem> ThenBy<TItem, TKey>(this IOrderableEnumerableExpression<TItem> source, Expression<Func<TItem, TKey>> keySelector, IComparer<TKey> comparer)

Parameters

source IOrderableEnumerableExpression<TItem>

The current collection

keySelector Expression<Func<TItem, TKey>>

A lambda expression to select the features used for ordering

comparer IComparer<TKey>

A comparer to determine comparison

Returns

IOrderableEnumerableExpression<TItem>

A collection with the elements of the current collection but ordered in lower priority for the given predicate

Type Parameters

TItem

The elements type

TKey

The ordering key type

TopX<TItem, TKey>(IEnumerableExpression<TItem>, int, Expression<Func<TItem, TKey>>)

Gets the top x elements of the given collection, ordered by the given feature

[ObservableProxy(typeof(ObservableTopX<,>), "CreateExpressionSelector", false)]
public static KeyValuePair<TItem, TKey>[] TopX<TItem, TKey>(this IEnumerableExpression<TItem> source, int x, Expression<Func<TItem, TKey>> keySelector)

Parameters

source IEnumerableExpression<TItem>

The element source

x int

A number indicating how many items should be selected

keySelector Expression<Func<TItem, TKey>>

An expression to denote the selection of key features

Returns

KeyValuePair<TItem, TKey>[]

An array with the largest entries of the underlying collection

Type Parameters

TItem

The item type

TKey

The key type

TopX<TItem, TKey>(IEnumerableExpression<TItem>, int, Expression<Func<TItem, TKey>>, IComparer<TKey>)

Gets the top x elements of the given collection, ordered by the given feature

[ObservableProxy(typeof(ObservableTopX<,>), "CreateExpressionSelectorComparer", false)]
public static KeyValuePair<TItem, TKey>[] TopX<TItem, TKey>(this IEnumerableExpression<TItem> source, int x, Expression<Func<TItem, TKey>> keySelector, IComparer<TKey> comparer)

Parameters

source IEnumerableExpression<TItem>

The element source

x int

A number indicating how many items should be selected

keySelector Expression<Func<TItem, TKey>>

An expression to denote the selection of key features

comparer IComparer<TKey>

A custom comparer

Returns

KeyValuePair<TItem, TKey>[]

An array with the largest entries of the underlying collection

Type Parameters

TItem

The item type

TKey

The key type

Union<TSource>(IEnumerableExpression<TSource>, IEnumerable<TSource>)

Unions the current collection with the given other collection

public static IEnumerableExpression<TSource> Union<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> source2)

Parameters

source IEnumerableExpression<TSource>

The current collection

source2 IEnumerable<TSource>

The given other collection

Returns

IEnumerableExpression<TSource>

A collection containing the union of both collections

Type Parameters

TSource

The elements type

Union<TSource>(IEnumerableExpression<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

Unions the current collection with the given other collection

public static IEnumerableExpression<TSource> Union<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> source2, IEqualityComparer<TSource> comparer)

Parameters

source IEnumerableExpression<TSource>

The current collection

source2 IEnumerable<TSource>

The given other collection

comparer IEqualityComparer<TSource>

A comparer to determine equality

Returns

IEnumerableExpression<TSource>

A collection containing the union of both collections

Type Parameters

TSource

The elements type

Where<T>(ICollectionExpression<T>, Expression<Func<T, bool>>)

Filters the given collection with the given predicate

[ParameterDataflow(1, 0, 0)]
[ExpressionCompileRewriter(typeof(ExpressionExtensions.Rewrites), "RewriteWhereCollection")]
public static ICollectionExpression<T> Where<T>(this ICollectionExpression<T> source, Expression<Func<T, bool>> filter)

Parameters

source ICollectionExpression<T>

The current collection

filter Expression<Func<T, bool>>

The predicate used for filtering

Returns

ICollectionExpression<T>

A collection containing the elements that passed the filter

Type Parameters

T

The element type

Where<T>(ICollectionExpression<T>, Expression<Func<T, bool>>, Func<T, bool>, Action<T, bool>)

Filters the given collection with the given predicate

[ParameterDataflow(1, 0, 0)]
public static ICollectionExpression<T> Where<T>(this ICollectionExpression<T> source, Expression<Func<T, bool>> filter, Func<T, bool> filterGetter, Action<T, bool> filterSetter)

Parameters

source ICollectionExpression<T>

The current collection

filter Expression<Func<T, bool>>

The predicate used for filtering

filterGetter Func<T, bool>

A precompiled filter getter

filterSetter Action<T, bool>

A precompiled filter setter

Returns

ICollectionExpression<T>

A collection containing the elements that passed the filter

Type Parameters

T

The element type

Where<T>(IEnumerableExpression<T>, Expression<Func<T, bool>>)

Filters the given collection with the given predicate

[ParameterDataflow(1, 0, 0)]
[ExpressionCompileRewriter(typeof(ExpressionExtensions.Rewrites), "RewriteWhereEnumerable")]
public static IEnumerableExpression<T> Where<T>(this IEnumerableExpression<T> source, Expression<Func<T, bool>> filter)

Parameters

source IEnumerableExpression<T>

The current collection

filter Expression<Func<T, bool>>

The predicate used for filtering

Returns

IEnumerableExpression<T>

A collection containing the elements that passed the filter

Type Parameters

T

The element type

Where<T>(IEnumerableExpression<T>, Expression<Func<T, bool>>, Func<T, bool>)

Filters the given collection with the given predicate

[ParameterDataflow(1, 0, 0)]
public static IEnumerableExpression<T> Where<T>(this IEnumerableExpression<T> source, Expression<Func<T, bool>> filter, Func<T, bool> filterCompiled)

Parameters

source IEnumerableExpression<T>

The current collection

filter Expression<Func<T, bool>>

The predicate used for filtering

filterCompiled Func<T, bool>

The filter predicate precompiled

Returns

IEnumerableExpression<T>

A collection containing the elements that passed the filter

Type Parameters

T

The element type