Show / Hide Table of Contents

Class ExpressionExtensions

Defines a set of extension methods on the INotifyValue monad

Inheritance
object
ExpressionExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NMF.Expressions.Linq
Assembly: NMF.Expressions.Linq.dll
Syntax
public static class ExpressionExtensions

Methods

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, bool>> predicate

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

Returns
Type Description
bool

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

Type Parameters
Name Description
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

| Edit this page View Source

Any<TSource>(IEnumerableExpression<TSource>)

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

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

The source collection

Returns
Type Description
bool

True, if the collection has an item, otherwise false

Type Parameters
Name Description
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

| Edit this page View Source

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

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

The source collection

Expression<Func<TSource, bool>> predicate

A custom predicate that is checked for every item

Returns
Type Description
bool

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

Type Parameters
Name Description
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

| Edit this page View Source

AsOne<T>(T)

Captures the given element as a collection containing just this element

Declaration
public static IEnumerableExpression<T> AsOne<T>(this T item)
Parameters
Type Name Description
T item

The item

Returns
Type Description
IEnumerableExpression<T>

A collection expression consisting only of this element

Type Parameters
Name Description
T

The type of the element

| Edit this page View Source

Average(IEnumerableExpression<decimal>)

Gets the average of the given collection of numbers

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

A collection of numbers

Returns
Type Description
decimal

The average of the given collection

Remarks

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

| Edit this page View Source

Average(IEnumerableExpression<double>)

Gets the average of the given collection of numbers

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

A collection of numbers

Returns
Type Description
double

The average of the given collection

Remarks

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

| Edit this page View Source

Average(IEnumerableExpression<int>)

Gets the average of the given collection of numbers

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

A collection of numbers

Returns
Type Description
double

The average of the given collection

Remarks

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

| Edit this page View Source

Average(IEnumerableExpression<long>)

Gets the average of the given collection of numbers

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

A collection of numbers

Returns
Type Description
double

The average of the given collection

Remarks

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

| Edit this page View Source

Average(IEnumerableExpression<decimal?>)

Gets the average of the given collection of numbers

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

A collection of numbers

Returns
Type Description
decimal?

The average of the given collection

Remarks

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

| Edit this page View Source

Average(IEnumerableExpression<double?>)

Gets the average of the given collection of numbers

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

A collection of numbers

Returns
Type Description
double?

The average of the given collection

Remarks

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

| Edit this page View Source

Average(IEnumerableExpression<int?>)

Gets the average of the given collection of numbers

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

A collection of numbers

Returns
Type Description
double?

The average of the given collection

Remarks

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

| Edit this page View Source

Average(IEnumerableExpression<long?>)

Gets the average of the given collection of numbers

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

A collection of numbers

Returns
Type Description
double?

The average of the given collection

Remarks

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

| Edit this page View Source

Average(IEnumerableExpression<float?>)

Gets the average of the given collection of numbers

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

A collection of numbers

Returns
Type Description
float?

The average of the given collection

Remarks

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

| Edit this page View Source

Average(IEnumerableExpression<float>)

Gets the average of the given collection of numbers

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

A collection of numbers

Returns
Type Description
float

The average of the given collection

Remarks

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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, decimal>> predicate

The feature of the source items that should be averaged

Returns
Type Description
decimal
Type Parameters
Name Description
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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, double>> predicate

The feature of the source items that should be averaged

Returns
Type Description
double
Type Parameters
Name Description
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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, int>> predicate

The feature of the source items that should be averaged

Returns
Type Description
double
Type Parameters
Name Description
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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, long>> predicate

The feature of the source items that should be averaged

Returns
Type Description
double
Type Parameters
Name Description
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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, decimal?>> predicate

The feature of the source items that should be averaged

Returns
Type Description
decimal?
Type Parameters
Name Description
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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, double?>> predicate

The feature of the source items that should be averaged

Returns
Type Description
double?
Type Parameters
Name Description
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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, int?>> predicate

The feature of the source items that should be averaged

Returns
Type Description
double?
Type Parameters
Name Description
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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, long?>> predicate

The feature of the source items that should be averaged

Returns
Type Description
double?
Type Parameters
Name Description
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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, float?>> predicate

The feature of the source items that should be averaged

Returns
Type Description
float?
Type Parameters
Name Description
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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, float>> predicate

The feature of the source items that should be averaged

Returns
Type Description
float
Type Parameters
Name Description
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

| Edit this page View Source

Cast<TResult>(IEnumerableExpression)

Casts the given notifying enumerable to the given type

Declaration
public static IEnumerableExpression<TResult> Cast<TResult>(this IEnumerableExpression source)
Parameters
Type Name Description
IEnumerableExpression source

The source collection

Returns
Type Description
IEnumerableExpression<TResult>

A notifying collection casted to the given type

Type Parameters
Name Description
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.

| Edit this page View Source

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

Concats the given notifying enumerables

Declaration
public static IEnumerableExpression<TSource> Concat<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> source2)
Parameters
Type Name Description
IEnumerableExpression<TSource> source

The first source

IEnumerable<TSource> source2

The second source

Returns
Type Description
IEnumerableExpression<TSource>

The concatenation of both sources

Type Parameters
Name Description
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.

| Edit this page View Source

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

Searches the given collection for the given item

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

The source collection

TSource item

The item that needs to be checked

Returns
Type Description
bool

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

Type Parameters
Name Description
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

| Edit this page View Source

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

Searches the given collection for the given item

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

The source collection

TSource item

The item that needs to be checked

IEqualityComparer<TSource> comparer

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

Returns
Type Description
bool

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

Type Parameters
Name Description
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

| Edit this page View Source

Count<TSource>(IEnumerableExpression<TSource>)

Returns how many items are in the source collection

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

The source collection

Returns
Type Description
int

The amount of elements in the source collection

Type Parameters
Name Description
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

| Edit this page View Source

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

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

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

The source collection

Expression<Func<TSource, bool>> predicate

The predicate that is to be checked for each item

Returns
Type Description
int

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

Type Parameters
Name Description
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

| Edit this page View Source

Distinct<TSource>(IEnumerableExpression<TSource>)

Eliminates duplicates from the given collection

Declaration
public static IEnumerableExpression<TSource> Distinct<TSource>(this IEnumerableExpression<TSource> source)
Parameters
Type Name Description
IEnumerableExpression<TSource> source

The source collection

Returns
Type Description
IEnumerableExpression<TSource>

A notifying collection with no duplicates

Type Parameters
Name Description
TSource

The element type of the source collection

Remarks

This method destroys the original order of the items

| Edit this page View Source

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

Eliminates duplicates from the given collection

Declaration
public static IEnumerableExpression<TSource> Distinct<TSource>(this IEnumerableExpression<TSource> source, IEqualityComparer<TSource> comparer)
Parameters
Type Name Description
IEnumerableExpression<TSource> source

The source collection

IEqualityComparer<TSource> comparer

The comparer to decide whether items match

Returns
Type Description
IEnumerableExpression<TSource>

A notifying collection with no duplicates

Type Parameters
Name Description
TSource

The element type of the source collection

Remarks

This method destroys the original order of the items

| Edit this page View Source

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

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

Declaration
public static IEnumerableExpression<TSource> Except<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> exceptions)
Parameters
Type Name Description
IEnumerableExpression<TSource> source

The source collection

IEnumerable<TSource> exceptions

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

Returns
Type Description
IEnumerableExpression<TSource>

The source collection without the exceptions

Type Parameters
Name Description
TSource

The type of the items

Remarks

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

| Edit this page View Source

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

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

Declaration
public static IEnumerableExpression<TSource> Except<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> exceptions, IEqualityComparer<TSource> comparer)
Parameters
Type Name Description
IEnumerableExpression<TSource> source

The source collection

IEnumerable<TSource> exceptions

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

IEqualityComparer<TSource> comparer

A comparer to decide whether two items match

Returns
Type Description
IEnumerableExpression<TSource>

The source collection without the exceptions

Type Parameters
Name Description
TSource

The type of the items

Remarks

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

| Edit this page View Source

FirstOrDefault<TSource>(IEnumerableExpression<TSource>)

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

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

The source collection

Returns
Type Description
TSource

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

Type Parameters
Name Description
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

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The source collection

Expression<Func<TSource, bool>> predicate

The filter predicate

Returns
Type Description
TSource

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

Type Parameters
Name Description
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

| Edit this page View Source

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

Groups the given collection by the given predicate

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

The source collection

Expression<Func<TSource, TKey>> keySelector

The predicate expression selecting the keys for grouping

Returns
Type Description
IEnumerableExpression<IGroupingExpression<TKey, TSource>>

A collection of groups

Type Parameters
Name Description
TSource

The element type of the source collection

TKey

The type of keys used for grouping

| Edit this page View Source

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

Groups the given collection by the given predicate

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The source collection

Expression<Func<TSource, TKey>> keySelector

The predicate expression selecting the keys for grouping

IEqualityComparer<TKey> comparer

A comparer that decides whether items are identical

Returns
Type Description
IEnumerableExpression<IGroupingExpression<TKey, TSource>>

A collection of groups

Type Parameters
Name Description
TSource

The element type of the source collection

TKey

The type of keys used for grouping

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The source collection

Expression<Func<TSource, TKey>> keySelector

The predicate expression selecting the keys for grouping

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

A function to get the result element for a group

Returns
Type Description
IEnumerableExpression<TResult>

A collection of groups

Type Parameters
Name Description
TSource

The element type of the source collection

TKey

The type of keys used for grouping

TResult

The type of the result

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The source collection

Expression<Func<TSource, TKey>> keySelector

The predicate expression selecting the keys for grouping

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

A function to get the result element for a group

IEqualityComparer<TKey> comparer

A comparer that decides whether items are identical

Returns
Type Description
IEnumerableExpression<TResult>

A collection of groups

Type Parameters
Name Description
TSource

The element type of the source collection

TKey

The type of keys used for grouping

TResult

The type of the result

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TOuter> outer

The outer collection

IEnumerable<TInner> inner

The inner collection

Expression<Func<TOuter, TKey>> outerKeySelector

A predicate that returns the key for each outer item

Expression<Func<TInner, TKey>> innerKeySelector

A predicate that returns the key for each inner item

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

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

Returns
Type Description
IEnumerableExpression<TResult>

A collection of grouped results

Type Parameters
Name Description
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

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TOuter> outer

The outer collection

IEnumerable<TInner> inner

The inner collection

Expression<Func<TOuter, TKey>> outerKeySelector

A predicate that returns the key for each outer item

Expression<Func<TInner, TKey>> innerKeySelector

A predicate that returns the key for each inner item

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

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

IEqualityComparer<TKey> comparer

A comparer to decide when two items are equal

Returns
Type Description
IEnumerableExpression<TResult>

A collection of grouped results

Type Parameters
Name Description
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

| Edit this page View Source

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

Intersects two collections

Declaration
public static IEnumerableExpression<TSource> Intersect<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> source2)
Parameters
Type Name Description
IEnumerableExpression<TSource> source

The first collection

IEnumerable<TSource> source2

The second collection

Returns
Type Description
IEnumerableExpression<TSource>

The intersection of both collections

Type Parameters
Name Description
TSource

The element type of the collections

Remarks

No deduplication is done

| Edit this page View Source

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

Intersects two collections

Declaration
public static IEnumerableExpression<TSource> Intersect<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> source2, IEqualityComparer<TSource> comparer)
Parameters
Type Name Description
IEnumerableExpression<TSource> source

The first collection

IEnumerable<TSource> source2

The second collection

IEqualityComparer<TSource> comparer

A comparer to decide when two items are equal

Returns
Type Description
IEnumerableExpression<TSource>

The intersection of both collections

Type Parameters
Name Description
TSource

The element type of the collections

Remarks

No deduplication is done

| Edit this page View Source

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

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

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

The source collection

IEnumerable<T> other

The collection that is compared to

Returns
Type Description
bool

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

Type Parameters
Name Description
T

The element type

Remarks

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

| Edit this page View Source

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

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

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

The source collection

IEnumerable<T> other

The collection that is compared to

IEqualityComparer<T> comparer

The comparer to define equality

Returns
Type Description
bool

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

Type Parameters
Name Description
T

The element type

Remarks

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

| Edit this page View Source

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

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

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

The source collection

IEnumerable<T> other

The collection that is compared to

Returns
Type Description
bool

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

Type Parameters
Name Description
T

The element type

Remarks

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

| Edit this page View Source

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

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

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

The source collection

IEnumerable<T> other

The collection that is compared to

IEqualityComparer<T> comparer

The comparer to define equality

Returns
Type Description
bool

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

Type Parameters
Name Description
T

The element type

Remarks

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

| Edit this page View Source

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

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

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

The source collection

IEnumerable<T> other

The collection that is compared to

Returns
Type Description
bool

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

Type Parameters
Name Description
T

The element type

Remarks

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

| Edit this page View Source

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

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

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

The source collection

IEnumerable<T> other

The collection that is compared to

IEqualityComparer<T> comparer

The comparer to define equality

Returns
Type Description
bool

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

Type Parameters
Name Description
T

The element type

Remarks

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

| Edit this page View Source

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

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

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

The source collection

IEnumerable<T> other

The collection that is compared to

Returns
Type Description
bool

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

Type Parameters
Name Description
T

The element type

Remarks

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

| Edit this page View Source

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

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

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

The source collection

IEnumerable<T> other

The collection that is compared to

IEqualityComparer<T> comparer

The comparer to define equality

Returns
Type Description
bool

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

Type Parameters
Name Description
T

The element type

Remarks

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

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TOuter> outerSource

The current collection

IEnumerable<TInner> innerSource

The other collection to join with

Expression<Func<TOuter, TKey>> outerKeySelector

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

Expression<Func<TInner, TKey>> innerKeySelector

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

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

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

Returns
Type Description
IEnumerableExpression<TResult>

A joined collection

Type Parameters
Name Description
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

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TOuter> outerSource

The current collection

IEnumerable<TInner> innerSource

The other collection to join with

Expression<Func<TOuter, TKey>> outerKeySelector

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

Expression<Func<TInner, TKey>> innerKeySelector

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

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

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

IEqualityComparer<TKey> comparer

An equality comparer to define when two keys are equivalent

Returns
Type Description
IEnumerableExpression<TResult>

A joined collection

Type Parameters
Name Description
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

| Edit this page View Source

Max<TSource>(IEnumerableExpression<TSource?>)

Gets the maximum element of the given collection

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

The collection

Returns
Type Description
TSource?

An element which is maximal

Type Parameters
Name Description
TSource

The element type

Remarks

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

| Edit this page View Source

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

Gets the maximum element of the given collection

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

The collection

IComparer<TSource> comparer

A comparer for custom comparison

Returns
Type Description
TSource?

An element which is maximal

Type Parameters
Name Description
TSource

The element type

Remarks

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

| Edit this page View Source

Max<TSource>(IEnumerableExpression<TSource>)

Gets the maximum element of the given collection

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

The collection

Returns
Type Description
TSource

An element which is maximal

Type Parameters
Name Description
TSource

The element type

Remarks

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

| Edit this page View Source

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

Gets the maximum element of the given collection

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

The collection

IComparer<TSource> comparer

A comparer for custom comparison

Returns
Type Description
TSource

An element which is maximal

Type Parameters
Name Description
TSource

The element type

Remarks

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

| Edit this page View Source

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

Gets the maximum feature of the given collection

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The collection

Expression<Func<TSource, TResult?>> selector

A lambda expression to obtain the elements feature in quest

Returns
Type Description
TResult?

An elements feature which is maximal

Type Parameters
Name Description
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

| Edit this page View Source

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

Gets the maximum feature of the given collection

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The collection

Expression<Func<TSource, TResult?>> selector

A lambda expression to obtain the elements feature in quest

IComparer<TResult> comparer

A comparer for custom comparison

Returns
Type Description
TResult?

An elements feature which is maximal

Type Parameters
Name Description
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

| Edit this page View Source

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

Gets the maximum feature of the given collection

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The collection

Expression<Func<TSource, TResult>> selector

A lambda expression to obtain the elements feature in quest

Returns
Type Description
TResult

An elements feature which is maximal

Type Parameters
Name Description
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

| Edit this page View Source

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

Gets the maximum feature of the given collection

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The collection

Expression<Func<TSource, TResult>> selector

A lambda expression to obtain the elements feature in quest

IComparer<TResult> comparer

A comparer for custom comparison

Returns
Type Description
TResult

An elements feature which is maximal

Type Parameters
Name Description
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

| Edit this page View Source

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

Gets the maximum feature of the given collection

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The collection

Expression<Func<TSource, TResult>> selector

A lambda expression to obtain the elements feature in quest

Func<TSource, TResult> selectorCompiled

A compiled version of the selector

Returns
Type Description
TResult

An elements feature which is maximal

Type Parameters
Name Description
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

| Edit this page View Source

Min<TSource>(IEnumerableExpression<TSource?>)

Gets the minimum element of the given collection

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

The collection

Returns
Type Description
TSource?

An element which is minimal

Type Parameters
Name Description
TSource

The element type

Remarks

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

| Edit this page View Source

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

Gets the minimum element of the given collection

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

The collection

IComparer<TSource> comparer

A comparer for custom comparison

Returns
Type Description
TSource?

An element which is minimal

Type Parameters
Name Description
TSource

The element type

Remarks

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

| Edit this page View Source

Min<TSource>(IEnumerableExpression<TSource>)

Gets the minimum element of the given collection

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

The collection

Returns
Type Description
TSource

An element which is minimal

Type Parameters
Name Description
TSource

The element type

Remarks

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

| Edit this page View Source

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

Gets the minimum element of the given collection

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

The collection

IComparer<TSource> comparer

A comparer for custom comparison

Returns
Type Description
TSource

An element which is minimal

Type Parameters
Name Description
TSource

The element type

Remarks

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

| Edit this page View Source

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

Gets the minimum feature of the given collection

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The collection

Expression<Func<TSource, TResult?>> selector

A lambda expression to obtain the elements feature in quest

Returns
Type Description
TResult?

An elements feature which is minimal

Type Parameters
Name Description
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

| Edit this page View Source

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

Gets the minimum feature of the given collection

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The collection

Expression<Func<TSource, TResult?>> selector

A lambda expression to obtain the elements feature in quest

IComparer<TResult> comparer

A comparer for custom comparison

Returns
Type Description
TResult?

An elements feature which is minimal

Type Parameters
Name Description
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

| Edit this page View Source

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

Gets the minimum feature of the given collection

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The collection

Expression<Func<TSource, TResult>> selector

A lambda expression to obtain the elements feature in quest

Returns
Type Description
TResult

An elements feature which is minimal

Type Parameters
Name Description
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

| Edit this page View Source

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

Gets the minimum feature of the given collection

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The collection

Expression<Func<TSource, TResult>> selector

A lambda expression to obtain the elements feature in quest

IComparer<TResult> comparer

A comparer for custom comparison

Returns
Type Description
TResult

An elements feature which is minimal

Type Parameters
Name Description
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

| Edit this page View Source

OfType<TResult>(ICollectionExpression)

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

Declaration
public static ICollectionExpression<TResult> OfType<TResult>(this ICollectionExpression source)
Parameters
Type Name Description
ICollectionExpression source

The current collection

Returns
Type Description
ICollectionExpression<TResult>

A collection containing the elements of the given type

Type Parameters
Name Description
TResult

The result type

Remarks

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

| Edit this page View Source

OfType<TResult>(IEnumerableExpression)

Filters the given collection for elements of the given type

Declaration
public static IEnumerableExpression<TResult> OfType<TResult>(this IEnumerableExpression source)
Parameters
Type Name Description
IEnumerableExpression source

The current collection

Returns
Type Description
IEnumerableExpression<TResult>

A collection containing the elements of the given type

Type Parameters
Name Description
TResult

The result type

| Edit this page View Source

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

Filters the given collection for elements of the given type

Declaration
public static ICollectionExpression<TResult> OfType<TSource, TResult>(this ICollectionExpression<TSource> source) where TResult : TSource
Parameters
Type Name Description
ICollectionExpression<TSource> source

The current collection

Returns
Type Description
ICollectionExpression<TResult>

A collection containing the elements of the given type

Type Parameters
Name Description
TSource

The type of the original collection

TResult

The result type

| Edit this page View Source

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

Orders the given collection descending by the given predicate

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

The collection that should be sorted

Expression<Func<TItem, TKey>> keySelector

A lambda expression selecting the sorting keys for the given collection

Returns
Type Description
IOrderableEnumerableExpression<TItem>

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

Type Parameters
Name Description
TItem

The elements type

TKey

The type of the keys used for ordering

| Edit this page View Source

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

Orders the given collection descending by the given predicate

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

The collection that should be sorted

Expression<Func<TItem, TKey>> keySelector

A lambda expression selecting the sorting keys for the given collection

IComparer<TKey> comparer

A comparer for custom comparison

Returns
Type Description
IOrderableEnumerableExpression<TItem>

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

Type Parameters
Name Description
TItem

The elements type

TKey

The type of the keys used for ordering

| Edit this page View Source

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

Orders the given collection ascending by the given predicate

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

The collection that should be sorted

Expression<Func<TItem, TKey>> keySelector

A lambda expression selecting the sorting keys for the given collection

Returns
Type Description
IOrderableEnumerableExpression<TItem>

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

Type Parameters
Name Description
TItem

The elements type

TKey

The type of the keys used for ordering

| Edit this page View Source

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

Orders the given collection ascending by the given predicate

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

The collection that should be sorted

Expression<Func<TItem, TKey>> keySelector

A lambda expression selecting the sorting keys for the given collection

IComparer<TKey> comparer

A comparer for custom comparison

Returns
Type Description
IOrderableEnumerableExpression<TItem>

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

Type Parameters
Name Description
TItem

The elements type

TKey

The type of the keys used for ordering

| Edit this page View Source

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

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

The current collection

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

A lambda expression to select subsequent collections

Returns
Type Description
IEnumerableExpression<TResult>

A collection with the results

Type Parameters
Name Description
TSource

The source element type

TResult

The result element type

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The current collection

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

A lambda expression to select subsequent collections

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

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

Returns
Type Description
IEnumerableExpression<TResult>

A collection with the results

Type Parameters
Name Description
TSource

The source element type

TIntermediate

The element type of the subsequent collection

TResult

The result element type

| Edit this page View Source

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

Maps the current collection to the given lambda expression

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The current collection

Expression<Func<TSource, TResult>> selector

A lambda expression representing the mapping result for a given item

Returns
Type Description
IEnumerableExpression<TResult>

A collection with the mapping results

Type Parameters
Name Description
TSource

The elements type

TResult

The result element type

| Edit this page View Source

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

Maps the current collection to the given lambda expression

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The current collection

Expression<Func<TSource, TResult>> selector

A lambda expression representing the mapping result for a given item

Func<TSource, TResult> selectorCompiled

A compiled version of the selector

Returns
Type Description
IEnumerableExpression<TResult>

A collection with the mapping results

Type Parameters
Name Description
TSource

The elements type

TResult

The result element type

| Edit this page View Source

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

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

The current collection

IEnumerable<T> other

The given other collection

Returns
Type Description
bool

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

Type Parameters
Name Description
T

The element type

Remarks

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

| Edit this page View Source

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

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

The current collection

IEnumerable<T> other

The given other collection

IEqualityComparer<T> comparer

An equality comparer used to determine equality in the sets

Returns
Type Description
bool

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

Type Parameters
Name Description
T

The element type

Remarks

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

| Edit this page View Source

SingleOrDefault<TSource>(IEnumerableExpression<TSource>)

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

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

The source collection

Returns
Type Description
TSource

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

Type Parameters
Name Description
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

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The source collection

Expression<Func<TSource, bool>> predicate

The filter predicate

Returns
Type Description
TSource

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

Type Parameters
Name Description
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

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TSource> source

The source collection

Expression<Func<TSource, bool>> predicate

The filter predicate

Func<TSource, bool> predicateCompiled

The filter predicate precompiled

Returns
Type Description
TSource

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

Type Parameters
Name Description
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

| Edit this page View Source

Sum(IEnumerableExpression<decimal>)

Gets the sum of the current collection

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

The collection of numbers

Returns
Type Description
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

| Edit this page View Source

Sum(IEnumerableExpression<double>)

Gets the sum of the current collection

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

The collection of numbers

Returns
Type Description
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

| Edit this page View Source

Sum(IEnumerableExpression<int>)

Gets the sum of the current collection

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

The collection of numbers

Returns
Type Description
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

| Edit this page View Source

Sum(IEnumerableExpression<long>)

Gets the sum of the current collection

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

The collection of numbers

Returns
Type Description
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

| Edit this page View Source

Sum(IEnumerableExpression<decimal?>)

Gets the sum of the current collection

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

The collection of numbers

Returns
Type Description
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

| Edit this page View Source

Sum(IEnumerableExpression<double?>)

Gets the sum of the current collection

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

The collection of numbers

Returns
Type Description
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

| Edit this page View Source

Sum(IEnumerableExpression<int?>)

Gets the sum of the current collection

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

The collection of numbers

Returns
Type Description
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

| Edit this page View Source

Sum(IEnumerableExpression<long?>)

Gets the sum of the current collection

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

The collection of numbers

Returns
Type Description
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

| Edit this page View Source

Sum(IEnumerableExpression<float?>)

Gets the sum of the current collection

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

The collection of numbers

Returns
Type Description
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

| Edit this page View Source

Sum(IEnumerableExpression<float>)

Gets the sum of the current collection

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

The collection of numbers

Returns
Type Description
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

| Edit this page View Source

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

Gets the sum of the current collections features

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

The collection of numbers

Expression<Func<TSource, decimal>> selector

A lambda expression to represent the feature to be summed up

Returns
Type Description
decimal

The sum of the numbers contained in this collection elements features

Type Parameters
Name Description
TSource
Remarks

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

| Edit this page View Source

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

Gets the sum of the current collections features

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

The collection of numbers

Expression<Func<TSource, double>> selector

A lambda expression to represent the feature to be summed up

Returns
Type Description
double

The sum of the numbers contained in this collection elements features

Type Parameters
Name Description
TSource
Remarks

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

| Edit this page View Source

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

Gets the sum of the current collections features

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

The collection of numbers

Expression<Func<TSource, int>> selector

A lambda expression to represent the feature to be summed up

Returns
Type Description
int

The sum of the numbers contained in this collection elements features

Type Parameters
Name Description
TSource
Remarks

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

| Edit this page View Source

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

Gets the sum of the current collections features

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

The collection of numbers

Expression<Func<TSource, long>> selector

A lambda expression to represent the feature to be summed up

Returns
Type Description
long

The sum of the numbers contained in this collection elements features

Type Parameters
Name Description
TSource
Remarks

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

| Edit this page View Source

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

Gets the sum of the current collections features

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

The collection of numbers

Expression<Func<TSource, decimal?>> selector

A lambda expression to represent the feature to be summed up

Returns
Type Description
decimal?

The sum of the numbers contained in this collection elements features

Type Parameters
Name Description
TSource
Remarks

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

| Edit this page View Source

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

Gets the sum of the current collections features

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

The collection of numbers

Expression<Func<TSource, double?>> selector

A lambda expression to represent the feature to be summed up

Returns
Type Description
double?

The sum of the numbers contained in this collection elements features

Type Parameters
Name Description
TSource
Remarks

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

| Edit this page View Source

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

Gets the sum of the current collections features

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

The collection of numbers

Expression<Func<TSource, int?>> selector

A lambda expression to represent the feature to be summed up

Returns
Type Description
int?

The sum of the numbers contained in this collection elements features

Type Parameters
Name Description
TSource
Remarks

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

| Edit this page View Source

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

Gets the sum of the current collections features

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

The collection of numbers

Expression<Func<TSource, long?>> selector

A lambda expression to represent the feature to be summed up

Returns
Type Description
long?

The sum of the numbers contained in this collection elements features

Type Parameters
Name Description
TSource
Remarks

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

| Edit this page View Source

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

Gets the sum of the current collections features

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

The collection of numbers

Expression<Func<TSource, float?>> selector

A lambda expression to represent the feature to be summed up

Returns
Type Description
float?

The sum of the numbers contained in this collection elements features

Type Parameters
Name Description
TSource
Remarks

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

| Edit this page View Source

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

Gets the sum of the current collections features

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

The collection of numbers

Expression<Func<TSource, float>> selector

A lambda expression to represent the feature to be summed up

Returns
Type Description
float

The sum of the numbers contained in this collection elements features

Type Parameters
Name Description
TSource
Remarks

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

| Edit this page View Source

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

Orders the given orderable collection by the given predicate descending

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

The current collection

Expression<Func<TItem, TKey>> keySelector

A lambda expression to select the features used for ordering

Returns
Type Description
IOrderableEnumerableExpression<TItem>

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

Type Parameters
Name Description
TItem

The elements type

TKey

The ordering key type

| Edit this page View Source

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

Orders the given orderable collection by the given predicate descending

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

The current collection

Expression<Func<TItem, TKey>> keySelector

A lambda expression to select the features used for ordering

IComparer<TKey> comparer

A comparer to determine comparison

Returns
Type Description
IOrderableEnumerableExpression<TItem>

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

Type Parameters
Name Description
TItem

The elements type

TKey

The ordering key type

| Edit this page View Source

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

Orders the given orderable collection by the given predicate ascending

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

The current collection

Expression<Func<TItem, TKey>> keySelector

A lambda expression to select the features used for ordering

Returns
Type Description
IOrderableEnumerableExpression<TItem>

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

Type Parameters
Name Description
TItem

The elements type

TKey

The ordering key type

| Edit this page View Source

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

Orders the given orderable collection by the given predicate ascending

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

The current collection

Expression<Func<TItem, TKey>> keySelector

A lambda expression to select the features used for ordering

IComparer<TKey> comparer

A comparer to determine comparison

Returns
Type Description
IOrderableEnumerableExpression<TItem>

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

Type Parameters
Name Description
TItem

The elements type

TKey

The ordering key type

| Edit this page View Source

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

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

Declaration
[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
Type Name Description
IEnumerableExpression<TItem> source

The element source

int x

A number indicating how many items should be selected

Expression<Func<TItem, TKey>> keySelector

An expression to denote the selection of key features

Returns
Type Description
KeyValuePair<TItem, TKey>[]

An array with the largest entries of the underlying collection

Type Parameters
Name Description
TItem

The item type

TKey

The key type

| Edit this page View Source

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

Declaration
[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
Type Name Description
IEnumerableExpression<TItem> source

The element source

int x

A number indicating how many items should be selected

Expression<Func<TItem, TKey>> keySelector

An expression to denote the selection of key features

IComparer<TKey> comparer

A custom comparer

Returns
Type Description
KeyValuePair<TItem, TKey>[]

An array with the largest entries of the underlying collection

Type Parameters
Name Description
TItem

The item type

TKey

The key type

| Edit this page View Source

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

Unions the current collection with the given other collection

Declaration
public static IEnumerableExpression<TSource> Union<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> source2)
Parameters
Type Name Description
IEnumerableExpression<TSource> source

The current collection

IEnumerable<TSource> source2

The given other collection

Returns
Type Description
IEnumerableExpression<TSource>

A collection containing the union of both collections

Type Parameters
Name Description
TSource

The elements type

| Edit this page View Source

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

Unions the current collection with the given other collection

Declaration
public static IEnumerableExpression<TSource> Union<TSource>(this IEnumerableExpression<TSource> source, IEnumerable<TSource> source2, IEqualityComparer<TSource> comparer)
Parameters
Type Name Description
IEnumerableExpression<TSource> source

The current collection

IEnumerable<TSource> source2

The given other collection

IEqualityComparer<TSource> comparer

A comparer to determine equality

Returns
Type Description
IEnumerableExpression<TSource>

A collection containing the union of both collections

Type Parameters
Name Description
TSource

The elements type

| Edit this page View Source

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

Filters the given collection with the given predicate

Declaration
[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
Type Name Description
ICollectionExpression<T> source

The current collection

Expression<Func<T, bool>> filter

The predicate used for filtering

Returns
Type Description
ICollectionExpression<T>

A collection containing the elements that passed the filter

Type Parameters
Name Description
T

The element type

| Edit this page View Source

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

Filters the given collection with the given predicate

Declaration
[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
Type Name Description
ICollectionExpression<T> source

The current collection

Expression<Func<T, bool>> filter

The predicate used for filtering

Func<T, bool> filterGetter

A precompiled filter getter

Action<T, bool> filterSetter

A precompiled filter setter

Returns
Type Description
ICollectionExpression<T>

A collection containing the elements that passed the filter

Type Parameters
Name Description
T

The element type

| Edit this page View Source

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

Filters the given collection with the given predicate

Declaration
[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
Type Name Description
IEnumerableExpression<T> source

The current collection

Expression<Func<T, bool>> filter

The predicate used for filtering

Returns
Type Description
IEnumerableExpression<T>

A collection containing the elements that passed the filter

Type Parameters
Name Description
T

The element type

| Edit this page View Source

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

Filters the given collection with the given predicate

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

The current collection

Expression<Func<T, bool>> filter

The predicate used for filtering

Func<T, bool> filterCompiled

The filter predicate precompiled

Returns
Type Description
IEnumerableExpression<T>

A collection containing the elements that passed the filter

Type Parameters
Name Description
T

The element type

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX