Class ObservableExtensions
Defines a set of extension methods on the INotifyValue monad
Inherited Members
Namespace: NMF.Expressions.Linq
Assembly: NMF.Expressions.Linq.dll
Syntax
public static class ObservableExtensions
Properties
| Edit this page View SourceKeepOrder
Gets or sets a global flag indicating whether projections and filters should maintain the element order
Declaration
public static bool KeepOrder { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceAll<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, bool>>)
Gets a value indicating whether all items in the given collection match the given predicate
Declaration
[ObservableProxy(typeof(ObservableAll<>), "Create", false)]
public static bool All<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, bool>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Any<TSource>(INotifyEnumerable<TSource>)
Gets a value indicating whether there is any item in the source collection
Declaration
[ObservableProxy(typeof(ObservableAny<>), "Create", false)]
public static bool Any<TSource>(this INotifyEnumerable<TSource> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Any<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, bool>>)
Gets a value indicating whether there is any item in the source collection that matches the given predicate
Declaration
[ObservableProxy(typeof(ObservableLambdaAny<>), "Create", false)]
public static bool Any<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, bool>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average(INotifyEnumerable<decimal>)
Gets the average of the given collection of numbers
Declaration
[ObservableProxy(typeof(ObservableDecimalAverage), "Create", false)]
public static decimal Average(this INotifyEnumerable<decimal> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average(INotifyEnumerable<double>)
Gets the average of the given collection of numbers
Declaration
[ObservableProxy(typeof(ObservableDoubleAverage), "Create", false)]
public static double Average(this INotifyEnumerable<double> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average(INotifyEnumerable<int>)
Gets the average of the given collection of numbers
Declaration
[ObservableProxy(typeof(ObservableIntAverage), "Create", false)]
public static double Average(this INotifyEnumerable<int> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average(INotifyEnumerable<long>)
Gets the average of the given collection of numbers
Declaration
[ObservableProxy(typeof(ObservableLongAverage), "Create", false)]
public static double Average(this INotifyEnumerable<long> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average(INotifyEnumerable<decimal?>)
Gets the average of the given collection of numbers
Declaration
[ObservableProxy(typeof(ObservableNullableDecimalAverage), "Create", false)]
public static decimal? Average(this INotifyEnumerable<decimal?> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average(INotifyEnumerable<double?>)
Gets the average of the given collection of numbers
Declaration
[ObservableProxy(typeof(ObservableNullableDoubleAverage), "Create", false)]
public static double? Average(this INotifyEnumerable<double?> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average(INotifyEnumerable<int?>)
Gets the average of the given collection of numbers
Declaration
[ObservableProxy(typeof(ObservableNullableIntAverage), "Create", false)]
public static double? Average(this INotifyEnumerable<int?> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average(INotifyEnumerable<long?>)
Gets the average of the given collection of numbers
Declaration
[ObservableProxy(typeof(ObservableNullableLongAverage), "Create", false)]
public static double? Average(this INotifyEnumerable<long?> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average(INotifyEnumerable<float?>)
Gets the average of the given collection of numbers
Declaration
[ObservableProxy(typeof(ObservableNullableFloatAverage), "Create", false)]
public static float? Average(this INotifyEnumerable<float?> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average(INotifyEnumerable<float>)
Gets the average of the given collection of numbers
Declaration
[ObservableProxy(typeof(ObservableFloatAverage), "Create", false)]
public static float Average(this INotifyEnumerable<float> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, decimal>>)
Gets the average of the given feature based on items of the given collection
Declaration
[ObservableProxy(typeof(ObservableAverage), "CreateDecimal", false)]
public static decimal Average<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, decimal>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, double>>)
Gets the average of the given feature based on items of the given collection
Declaration
[ObservableProxy(typeof(ObservableAverage), "CreateDouble", false)]
public static double Average<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, double>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, int>>)
Gets the average of the given feature based on items of the given collection
Declaration
[ObservableProxy(typeof(ObservableAverage), "CreateInt", false)]
public static double Average<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, int>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, long>>)
Gets the average of the given feature based on items of the given collection
Declaration
[ObservableProxy(typeof(ObservableAverage), "CreateLong", false)]
public static double Average<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, long>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, decimal?>>)
Gets the average of the given feature based on items of the given collection
Declaration
[ObservableProxy(typeof(ObservableAverage), "CreateNullableDecimal", false)]
public static decimal? Average<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, decimal?>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, double?>>)
Gets the average of the given feature based on items of the given collection
Declaration
[ObservableProxy(typeof(ObservableAverage), "CreateNullableDouble", false)]
public static double? Average<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, double?>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, int?>>)
Gets the average of the given feature based on items of the given collection
Declaration
[ObservableProxy(typeof(ObservableAverage), "CreateNullableInt", false)]
public static double? Average<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, int?>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, long?>>)
Gets the average of the given feature based on items of the given collection
Declaration
[ObservableProxy(typeof(ObservableAverage), "CreateNullableLong", false)]
public static double? Average<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, long?>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, float?>>)
Gets the average of the given feature based on items of the given collection
Declaration
[ObservableProxy(typeof(ObservableAverage), "CreateNullableFloat", false)]
public static float? Average<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, float?>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Average<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, float>>)
Gets the average of the given feature based on items of the given collection
Declaration
[ObservableProxy(typeof(ObservableAverage), "CreateFloat", false)]
public static float Average<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, float>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Cast<TResult>(INotifyEnumerable)
Casts the given notifying enumerable to the given type
Declaration
public static INotifyEnumerable<TResult> Cast<TResult>(this INotifyEnumerable source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable | source | The source collection |
Returns
Type | Description |
---|---|
INotifyEnumerable<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>(INotifyEnumerable) in this scenario.
Concat<TSource>(INotifyEnumerable<TSource>, IEnumerable<TSource>)
Concats the given notifying enumerables
Declaration
public static INotifyEnumerable<TSource> Concat<TSource>(this INotifyEnumerable<TSource> source, IEnumerable<TSource> source2)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The first source |
IEnumerable<TSource> | source2 | The second source |
Returns
Type | Description |
---|---|
INotifyEnumerable<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.
Contains<TSource>(INotifyEnumerable<TSource>, TSource)
Searches the given collection for the given item
Declaration
[ObservableProxy(typeof(ObservableContains<>), "Create", false)]
public static bool Contains<TSource>(this INotifyEnumerable<TSource> source, TSource item)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Contains<TSource>(INotifyEnumerable<TSource>, TSource, IEqualityComparer<TSource>)
Searches the given collection for the given item
Declaration
[ObservableProxy(typeof(ObservableContains<>), "CreateWithComparer", false)]
public static bool Contains<TSource>(this INotifyEnumerable<TSource> source, TSource item, IEqualityComparer<TSource> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Count<TSource>(INotifyEnumerable<TSource>)
Returns how many items are in the source collection
Declaration
[ObservableProxy(typeof(ObservableCount<>), "Create", false)]
public static int Count<TSource>(this INotifyEnumerable<TSource> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Count<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, bool>>)
Returns how many items are in the source collection that match the given predicate
Declaration
[ObservableProxy(typeof(ObservableCount<>), "CreateWithComparer", false)]
public static int Count<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, bool>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Distinct<TSource>(INotifyEnumerable<TSource>)
Eliminates duplicates from the given collection
Declaration
public static INotifyEnumerable<TSource> Distinct<TSource>(this INotifyEnumerable<TSource> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The source collection |
Returns
Type | Description |
---|---|
INotifyEnumerable<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
Distinct<TSource>(INotifyEnumerable<TSource>, IEqualityComparer<TSource>)
Eliminates duplicates from the given collection
Declaration
public static INotifyEnumerable<TSource> Distinct<TSource>(this INotifyEnumerable<TSource> source, IEqualityComparer<TSource> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The source collection |
IEqualityComparer<TSource> | comparer | The comparer to decide whether items match |
Returns
Type | Description |
---|---|
INotifyEnumerable<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
Except<TSource>(INotifyEnumerable<TSource>, IEnumerable<TSource>)
Returns the given source collection without the elements from the second collection
Declaration
public static INotifyEnumerable<TSource> Except<TSource>(this INotifyEnumerable<TSource> source, IEnumerable<TSource> exceptions)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<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 INotifyCollectionChanged, otherwise the implementation will get corrupted.
Except<TSource>(INotifyEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)
Returns the given source collection without the elements from the second collection
Declaration
public static INotifyEnumerable<TSource> Except<TSource>(this INotifyEnumerable<TSource> source, IEnumerable<TSource> exceptions, IEqualityComparer<TSource> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<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 INotifyCollectionChanged, otherwise the implementation will get corrupted.
FirstOrDefault<TSource>(INotifyEnumerable<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<>), "Create", false)]
[SetExpressionRewriter(typeof(ObservableFirstOrDefault<>), "CreateSetExpression")]
public static TSource FirstOrDefault<TSource>(this INotifyEnumerable<TSource> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
FirstOrDefault<TSource>(INotifyEnumerable<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
[ObservableProxy(typeof(ObservableFirstOrDefault<>), "CreateForPredicate", false)]
[SetExpressionRewriter(typeof(ObservableFirstOrDefault<>), "CreateSetExpressionWithPredicate")]
public static TSource FirstOrDefault<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, bool>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
GroupBy<TSource, TKey>(INotifyEnumerable<TSource>, Expression<Func<TSource, TKey>>)
Groups the given collection by the given predicate
Declaration
public static INotifyEnumerable<INotifyGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The source collection |
Expression<Func<TSource, TKey>> | keySelector | The predicate expression selecting the keys for grouping |
Returns
Type | Description |
---|---|
INotifyEnumerable<INotifyGrouping<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 |
GroupBy<TSource, TKey>(INotifyEnumerable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>)
Groups the given collection by the given predicate
Declaration
public static INotifyEnumerable<INotifyGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<INotifyGrouping<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 |
GroupBy<TSource, TKey>(INotifyEnumerable<TSource>, Expression<Func<TSource, TKey>>, Func<TSource, TKey>)
Groups the given collection by the given predicate
Declaration
public static INotifyEnumerable<INotifyGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Func<TSource, TKey> keySelectorCompiled)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The source collection |
Expression<Func<TSource, TKey>> | keySelector | The predicate expression selecting the keys for grouping |
Func<TSource, TKey> | keySelectorCompiled | A compiled version of keySelector |
Returns
Type | Description |
---|---|
INotifyEnumerable<INotifyGrouping<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 |
GroupBy<TSource, TKey>(INotifyEnumerable<TSource>, Expression<Func<TSource, TKey>>, Func<TSource, TKey>, IEqualityComparer<TKey>)
Groups the given collection by the given predicate
Declaration
public static INotifyEnumerable<INotifyGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Func<TSource, TKey> keySelectorCompiled, IEqualityComparer<TKey> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The source collection |
Expression<Func<TSource, TKey>> | keySelector | The predicate expression selecting the keys for grouping |
Func<TSource, TKey> | keySelectorCompiled | A compiled version of keySelector |
IEqualityComparer<TKey> | comparer | A comparer that decides whether items are identical |
Returns
Type | Description |
---|---|
INotifyEnumerable<INotifyGrouping<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 |
GroupBy<TSource, TKey, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TKey>>, Func<TSource, TKey>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, Func<TKey, IEnumerable<TSource>, TResult>)
Groups the given collection by the given predicate into the given result
Declaration
public static INotifyEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Func<TSource, TKey> keySelectorCompiled, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelectorCompiled)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The source collection |
Expression<Func<TSource, TKey>> | keySelector | The predicate expression selecting the keys for grouping |
Func<TSource, TKey> | keySelectorCompiled | A compiled version of keySelector |
Expression<Func<TKey, IEnumerable<TSource>, TResult>> | resultSelector | A function to get the result element for a group |
Func<TKey, IEnumerable<TSource>, TResult> | resultSelectorCompiled | A compiled version of resultSelector |
Returns
Type | Description |
---|---|
INotifyEnumerable<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 |
GroupBy<TSource, TKey, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TKey>>, Func<TSource, TKey>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, Func<TKey, IEnumerable<TSource>, TResult>, IEqualityComparer<TKey>)
Groups the given collection by the given predicate into the given result
Declaration
public static INotifyEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Func<TSource, TKey> keySelectorCompiled, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelectorCompiled, IEqualityComparer<TKey> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The source collection |
Expression<Func<TSource, TKey>> | keySelector | The predicate expression selecting the keys for grouping |
Func<TSource, TKey> | keySelectorCompiled | A compiled version of keySelector |
Expression<Func<TKey, IEnumerable<TSource>, TResult>> | resultSelector | A function to get the result element for a group |
Func<TKey, IEnumerable<TSource>, TResult> | resultSelectorCompiled | A compiled version of resultSelector |
IEqualityComparer<TKey> | comparer | A comparer that decides whether items are identical |
Returns
Type | Description |
---|---|
INotifyEnumerable<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 |
GroupBy<TSource, TKey, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>)
Groups the given collection by the given predicate into the given result
Declaration
public static INotifyEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<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 |
GroupBy<TSource, TKey, TResult>(INotifyEnumerable<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
public static INotifyEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector, IEqualityComparer<TKey> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<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 |
GroupJoin<TOuter, TInner, TKey, TResult>(INotifyEnumerable<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
public static INotifyEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this INotifyEnumerable<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 |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<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 |
GroupJoin<TOuter, TInner, TKey, TResult>(INotifyEnumerable<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
public static INotifyEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this INotifyEnumerable<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 |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<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 |
Intersect<TSource>(INotifyEnumerable<TSource>, IEnumerable<TSource>)
Intersects two collections
Declaration
public static INotifyEnumerable<TSource> Intersect<TSource>(this INotifyEnumerable<TSource> source, IEnumerable<TSource> source2)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The first collection |
IEnumerable<TSource> | source2 | The second collection |
Returns
Type | Description |
---|---|
INotifyEnumerable<TSource> | The intersection of both collections |
Type Parameters
Name | Description |
---|---|
TSource | The element type of the collections |
Remarks
No deduplication is done
Intersect<TSource>(INotifyEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)
Intersects two collections
Declaration
public static INotifyEnumerable<TSource> Intersect<TSource>(this INotifyEnumerable<TSource> source, IEnumerable<TSource> source2, IEqualityComparer<TSource> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<TSource> | The intersection of both collections |
Type Parameters
Name | Description |
---|---|
TSource | The element type of the collections |
Remarks
No deduplication is done
IsProperSubsetOf<T>(INotifyEnumerable<T>, IEnumerable<T>)
Gets a value indicating whether the given collection is a proper subset of the current collection
Declaration
[ObservableProxy(typeof(ObservableProperSubsetOf<>), "Create", false)]
public static bool IsProperSubsetOf<T>(this INotifyEnumerable<T> source, IEnumerable<T> other)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
IsProperSubsetOf<T>(INotifyEnumerable<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<>), "CreateWithComparer", false)]
public static bool IsProperSubsetOf<T>(this INotifyEnumerable<T> source, IEnumerable<T> other, IEqualityComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
IsProperSupersetOf<T>(INotifyEnumerable<T>, IEnumerable<T>)
Gets a value indicating whether the given collection is a proper superset of the current collection
Declaration
[ObservableProxy(typeof(ObservableProperSupersetOf<>), "Create", false)]
public static bool IsProperSupersetOf<T>(this INotifyEnumerable<T> source, IEnumerable<T> other)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
IsProperSupersetOf<T>(INotifyEnumerable<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<>), "CreateWithComparer", false)]
public static bool IsProperSupersetOf<T>(this INotifyEnumerable<T> source, IEnumerable<T> other, IEqualityComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
IsSubsetOf<T>(INotifyEnumerable<T>, IEnumerable<T>)
Gets a value indicating whether the given collection is a proper subset of the current collection
Declaration
[ObservableProxy(typeof(ObservableSubsetOf<>), "Create", false)]
public static bool IsSubsetOf<T>(this INotifyEnumerable<T> source, IEnumerable<T> other)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
IsSubsetOf<T>(INotifyEnumerable<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<>), "CreateWithComparer", false)]
public static bool IsSubsetOf<T>(this INotifyEnumerable<T> source, IEnumerable<T> other, IEqualityComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
IsSupersetOf<T>(INotifyEnumerable<T>, IEnumerable<T>)
Gets a value indicating whether the given collection is a proper superset of the current collection
Declaration
[ObservableProxy(typeof(ObservableSupersetOf<>), "Create", false)]
public static bool IsSupersetOf<T>(this INotifyEnumerable<T> source, IEnumerable<T> other)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
IsSupersetOf<T>(INotifyEnumerable<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<>), "CreateWithComparer", false)]
public static bool IsSupersetOf<T>(this INotifyEnumerable<T> source, IEnumerable<T> other, IEqualityComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Join<TOuter, TInner, TKey, TResult>(INotifyEnumerable<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
public static INotifyEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this INotifyEnumerable<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 |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<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 |
Join<TOuter, TInner, TKey, TResult>(INotifyEnumerable<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
public static INotifyEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this INotifyEnumerable<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 |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<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 |
Max<TSource>(INotifyEnumerable<TSource?>)
Gets the maximum element of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "NullableMax", false)]
public static TSource? Max<TSource>(this INotifyEnumerable<TSource?> source) where TSource : struct, IComparable<TSource>
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Max<TSource>(INotifyEnumerable<TSource?>, IComparer<TSource>)
Gets the maximum element of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "NullableMaxWithComparer", false)]
public static TSource? Max<TSource>(this INotifyEnumerable<TSource?> source, IComparer<TSource> comparer) where TSource : struct
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Max<TSource>(INotifyEnumerable<TSource>)
Gets the maximum element of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "Max", false)]
public static TSource Max<TSource>(this INotifyEnumerable<TSource> source) where TSource : IComparable<TSource>
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Max<TSource>(INotifyEnumerable<TSource>, IComparer<TSource>)
Gets the maximum element of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "MaxWithComparer", false)]
public static TSource Max<TSource>(this INotifyEnumerable<TSource> source, IComparer<TSource> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Max<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TResult?>>)
Gets the maximum feature of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "LambdaNullableMax", false)]
public static TResult? Max<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TResult?>> selector) where TResult : struct, IComparable<TResult>
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 result type of the comparison |
Remarks
This method has an observable proxy, i.e. it can be used in a observable expression
Max<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TResult?>>, IComparer<TResult>)
Gets the maximum feature of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "LambdaNullableMaxWithComparer", false)]
public static TResult? Max<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TResult?>> selector, IComparer<TResult> comparer) where TResult : struct
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 result type of the comparison |
Remarks
This method has an observable proxy, i.e. it can be used in a observable expression
Max<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TResult>>)
Gets the maximum feature of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "LambdaMax", false)]
public static TResult Max<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TResult>> selector) where TResult : IComparable<TResult>
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 result type of the comparison |
Remarks
This method has an observable proxy, i.e. it can be used in a observable expression
Max<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TResult>>, IComparer<TResult>)
Gets the maximum feature of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "LambdaMaxWithComparer", false)]
public static TResult Max<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TResult>> selector, IComparer<TResult> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 result type of the comparison |
Remarks
This method has an observable proxy, i.e. it can be used in a observable expression
Min<TSource>(INotifyEnumerable<TSource?>)
Gets the minimum element of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "NullableMin", false)]
public static TSource? Min<TSource>(this INotifyEnumerable<TSource?> source) where TSource : struct, IComparable<TSource>
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Min<TSource>(INotifyEnumerable<TSource?>, IComparer<TSource>)
Gets the minimum element of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "NullableMinWithComparer", false)]
public static TSource? Min<TSource>(this INotifyEnumerable<TSource?> source, IComparer<TSource> comparer) where TSource : struct
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Min<TSource>(INotifyEnumerable<TSource>)
Gets the minimum element of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "Min", false)]
public static TSource Min<TSource>(this INotifyEnumerable<TSource> source) where TSource : IComparable<TSource>
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Min<TSource>(INotifyEnumerable<TSource>, IComparer<TSource>)
Gets the minimum element of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "MinWithComparer", false)]
public static TSource Min<TSource>(this INotifyEnumerable<TSource> source, IComparer<TSource> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Min<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TResult?>>)
Gets the minimum feature of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "LambdaNullableMin", false)]
public static TResult? Min<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TResult?>> selector) where TResult : struct, IComparable<TResult>
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 result type of the comparison |
Remarks
This method has an observable proxy, i.e. it can be used in a observable expression
Min<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TResult?>>, IComparer<TResult>)
Gets the minimum feature of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "LambdaNullableMinWithComparer", false)]
public static TResult? Min<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TResult?>> selector, IComparer<TResult> comparer) where TResult : struct
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 result type of the comparison |
Remarks
This method has an observable proxy, i.e. it can be used in a observable expression
Min<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TResult>>)
Gets the minimum feature of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "LambdaMin", false)]
public static TResult Min<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TResult>> selector) where TResult : IComparable<TResult>
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 result type of the comparison |
Remarks
This method has an observable proxy, i.e. it can be used in a observable expression
Min<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TResult>>, IComparer<TResult>)
Gets the minimum feature of the given collection
Declaration
[ObservableProxy(typeof(ObservableComparisons), "LambdaMinWithComparer", false)]
public static TResult Min<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TResult>> selector, IComparer<TResult> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 result type of the comparison |
Remarks
This method has an observable proxy, i.e. it can be used in a observable expression
OfType<TResult>(INotifyEnumerable)
Filters the given collection for elements of the given type
Declaration
public static INotifyEnumerable<TResult> OfType<TResult>(this INotifyEnumerable source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable | source | The current collection |
Returns
Type | Description |
---|---|
INotifyEnumerable<TResult> | A collection containing the elements of the given type |
Type Parameters
Name | Description |
---|---|
TResult | The result type |
OfType<TSource, TResult>(INotifyCollection<TSource>)
Filters the given collection for elements of the given type
Declaration
public static INotifyCollection<TResult> OfType<TSource, TResult>(this INotifyCollection<TSource> source) where TResult : TSource
Parameters
Type | Name | Description |
---|---|---|
INotifyCollection<TSource> | source | The current collection |
Returns
Type | Description |
---|---|
INotifyCollection<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 |
OrderByDescending<TItem, TKey>(INotifyEnumerable<TItem>, Expression<Func<TItem, TKey>>)
Orders the given collection descending by the given predicate
Declaration
public static IOrderableNotifyEnumerable<TItem> OrderByDescending<TItem, TKey>(this INotifyEnumerable<TItem> source, Expression<Func<TItem, TKey>> keySelector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
IOrderableNotifyEnumerable<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 |
OrderByDescending<TItem, TKey>(INotifyEnumerable<TItem>, Expression<Func<TItem, TKey>>, IComparer<TKey>)
Orders the given collection descending by the given predicate
Declaration
public static IOrderableNotifyEnumerable<TItem> OrderByDescending<TItem, TKey>(this INotifyEnumerable<TItem> source, Expression<Func<TItem, TKey>> keySelector, IComparer<TKey> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
IOrderableNotifyEnumerable<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 |
OrderBy<TItem, TKey>(INotifyEnumerable<TItem>, Expression<Func<TItem, TKey>>)
Orders the given collection ascending by the given predicate
Declaration
public static IOrderableNotifyEnumerable<TItem> OrderBy<TItem, TKey>(this INotifyEnumerable<TItem> source, Expression<Func<TItem, TKey>> keySelector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
IOrderableNotifyEnumerable<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 |
OrderBy<TItem, TKey>(INotifyEnumerable<TItem>, Expression<Func<TItem, TKey>>, IComparer<TKey>)
Orders the given collection ascending by the given predicate
Declaration
public static IOrderableNotifyEnumerable<TItem> OrderBy<TItem, TKey>(this INotifyEnumerable<TItem> source, Expression<Func<TItem, TKey>> keySelector, IComparer<TKey> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
IOrderableNotifyEnumerable<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 |
SelectMany<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, IEnumerable<TResult>>>)
Flattens the given collection of collections where the subsequent collections are selected by a predicate
Declaration
public static INotifyEnumerable<TResult> SelectMany<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, IEnumerable<TResult>>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The current collection |
Expression<Func<TSource, IEnumerable<TResult>>> | selector | A lambda expression to select subsequent collections |
Returns
Type | Description |
---|---|
INotifyEnumerable<TResult> | A collection with the results |
Type Parameters
Name | Description |
---|---|
TSource | The source element type |
TResult | The result element type |
SelectMany<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, IEnumerable<TResult>>>, Func<TSource, IEnumerable<TResult>>)
Flattens the given collection of collections where the subsequent collections are selected by a predicate
Declaration
public static INotifyEnumerable<TResult> SelectMany<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, IEnumerable<TResult>>> selector, Func<TSource, IEnumerable<TResult>> selectorCompiled)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The current collection |
Expression<Func<TSource, IEnumerable<TResult>>> | selector | A lambda expression to select subsequent collections |
Func<TSource, IEnumerable<TResult>> | selectorCompiled | A compiled version of the selector |
Returns
Type | Description |
---|---|
INotifyEnumerable<TResult> | A collection with the results |
Type Parameters
Name | Description |
---|---|
TSource | The source element type |
TResult | The result element type |
SelectMany<TSource, TIntermediate, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, IEnumerable<TIntermediate>>>, Func<TSource, IEnumerable<TIntermediate>>, Expression<Func<TSource, TIntermediate, TResult>>, Func<TSource, TIntermediate, TResult>)
Flattens the given collection of collections where the subsequent collections are selected by a predicate
Declaration
public static INotifyEnumerable<TResult> SelectMany<TSource, TIntermediate, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, IEnumerable<TIntermediate>>> func, Func<TSource, IEnumerable<TIntermediate>> funcCompiled, Expression<Func<TSource, TIntermediate, TResult>> selector, Func<TSource, TIntermediate, TResult> selectorCompiled)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The current collection |
Expression<Func<TSource, IEnumerable<TIntermediate>>> | func | A lambda expression to select subsequent collections |
Func<TSource, IEnumerable<TIntermediate>> | funcCompiled | A compiled version of func |
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 |
Func<TSource, TIntermediate, TResult> | selectorCompiled | A compiled version of selector |
Returns
Type | Description |
---|---|
INotifyEnumerable<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 |
SelectMany<TSource, TIntermediate, TResult>(INotifyEnumerable<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
public static INotifyEnumerable<TResult> SelectMany<TSource, TIntermediate, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, IEnumerable<TIntermediate>>> func, Expression<Func<TSource, TIntermediate, TResult>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
---|---|
INotifyEnumerable<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 |
Select<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TResult>>)
Maps the current collection to the given lambda expression
Declaration
public static INotifyEnumerable<TResult> Select<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TResult>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The current collection |
Expression<Func<TSource, TResult>> | selector | A lambda expression representing the mapping result for a given item |
Returns
Type | Description |
---|---|
INotifyEnumerable<TResult> | A collection with the mapping results |
Type Parameters
Name | Description |
---|---|
TSource | The elements type |
TResult | The result element type |
Select<TSource, TResult>(INotifyEnumerable<TSource>, Expression<Func<TSource, TResult>>, Func<TSource, TResult>)
Maps the current collection to the given lambda expression
Declaration
public static INotifyEnumerable<TResult> Select<TSource, TResult>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, TResult>> selector, Func<TSource, TResult> selectorCompiled)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 form of the selector |
Returns
Type | Description |
---|---|
INotifyEnumerable<TResult> | A collection with the mapping results |
Type Parameters
Name | Description |
---|---|
TSource | The elements type |
TResult | The result element type |
SetEquals<T>(INotifyEnumerable<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<>), "Create", false)]
public static bool SetEquals<T>(this INotifyEnumerable<T> source, IEnumerable<T> other)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
SetEquals<T>(INotifyEnumerable<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<>), "CreateWithComparer", false)]
public static bool SetEquals<T>(this INotifyEnumerable<T> source, IEnumerable<T> other, IEqualityComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
SingleOrDefault<TSource>(INotifyEnumerable<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<>), "Create", false)]
[SetExpressionRewriter(typeof(ObservableSingleOrDefault<>), "CreateSetExpression")]
public static TSource SingleOrDefault<TSource>(this INotifyEnumerable<TSource> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
SingleOrDefault<TSource>(INotifyEnumerable<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
[ObservableProxy(typeof(ObservableSingleOrDefault<>), "CreateForPredicate", false)]
[SetExpressionRewriter(typeof(ObservableSingleOrDefault<>), "CreateSetExpressionWithPredicate")]
public static TSource SingleOrDefault<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, bool>> predicate)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum(INotifyEnumerable<decimal>)
Gets the sum of the current collection
Declaration
[ObservableProxy(typeof(ObservableSum), "SumDecimal", false)]
public static decimal Sum(this INotifyEnumerable<decimal> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum(INotifyEnumerable<double>)
Gets the sum of the current collection
Declaration
[ObservableProxy(typeof(ObservableSum), "SumDouble", false)]
public static double Sum(this INotifyEnumerable<double> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum(INotifyEnumerable<int>)
Gets the sum of the current collection
Declaration
[ObservableProxy(typeof(ObservableSum), "SumInt", false)]
public static int Sum(this INotifyEnumerable<int> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum(INotifyEnumerable<long>)
Gets the sum of the current collection
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLong", false)]
public static long Sum(this INotifyEnumerable<long> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum(INotifyEnumerable<decimal?>)
Gets the sum of the current collection
Declaration
[ObservableProxy(typeof(ObservableSum), "SumNullableDecimal", false)]
public static decimal? Sum(this INotifyEnumerable<decimal?> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum(INotifyEnumerable<double?>)
Gets the sum of the current collection
Declaration
[ObservableProxy(typeof(ObservableSum), "SumNullableDouble", false)]
public static double? Sum(this INotifyEnumerable<double?> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum(INotifyEnumerable<int?>)
Gets the sum of the current collection
Declaration
[ObservableProxy(typeof(ObservableSum), "SumNullableInt", false)]
public static int? Sum(this INotifyEnumerable<int?> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum(INotifyEnumerable<long?>)
Gets the sum of the current collection
Declaration
[ObservableProxy(typeof(ObservableSum), "SumNullableLong", false)]
public static long? Sum(this INotifyEnumerable<long?> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum(INotifyEnumerable<float?>)
Gets the sum of the current collection
Declaration
[ObservableProxy(typeof(ObservableSum), "SumNullableFloat", false)]
public static float? Sum(this INotifyEnumerable<float?> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum(INotifyEnumerable<float>)
Gets the sum of the current collection
Declaration
[ObservableProxy(typeof(ObservableSum), "SumFloat", false)]
public static float Sum(this INotifyEnumerable<float> source)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, decimal>>)
Gets the sum of the current collections features
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLambdaDecimal", false)]
public static decimal Sum<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, decimal>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, double>>)
Gets the sum of the current collections features
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLambdaDouble", false)]
public static double Sum<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, double>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, int>>)
Gets the sum of the current collections features
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLambdaInt", false)]
public static int Sum<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, int>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, long>>)
Gets the sum of the current collections features
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLambdaLong", false)]
public static long Sum<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, long>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, decimal?>>)
Gets the sum of the current collections features
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLambdaNullableDecimal", false)]
public static decimal? Sum<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, decimal?>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, double?>>)
Gets the sum of the current collections features
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLambdaNullableDouble", false)]
public static double? Sum<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, double?>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, int?>>)
Gets the sum of the current collections features
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLambdaNullableInt", false)]
public static int? Sum<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, int?>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, long?>>)
Gets the sum of the current collections features
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLambdaNullableLong", false)]
public static long? Sum<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, long?>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, float?>>)
Gets the sum of the current collections features
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLambdaNullableFloat", false)]
public static float? Sum<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, float?>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
Sum<TSource>(INotifyEnumerable<TSource>, Expression<Func<TSource, float>>)
Gets the sum of the current collections features
Declaration
[ObservableProxy(typeof(ObservableSum), "SumLambdaFloat", false)]
public static float Sum<TSource>(this INotifyEnumerable<TSource> source, Expression<Func<TSource, float>> selector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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
ThenByDescending<TItem, TKey>(IOrderableNotifyEnumerable<TItem>, Expression<Func<TItem, TKey>>)
Orders the given orderable collection by the given predicate descending
Declaration
public static IOrderableNotifyEnumerable<TItem> ThenByDescending<TItem, TKey>(this IOrderableNotifyEnumerable<TItem> source, Expression<Func<TItem, TKey>> keySelector)
Parameters
Type | Name | Description |
---|---|---|
IOrderableNotifyEnumerable<TItem> | source | The current collection |
Expression<Func<TItem, TKey>> | keySelector | A lambda expression to select the features used for ordering |
Returns
Type | Description |
---|---|
IOrderableNotifyEnumerable<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 |
ThenByDescending<TItem, TKey>(IOrderableNotifyEnumerable<TItem>, Expression<Func<TItem, TKey>>, IComparer<TKey>)
Orders the given orderable collection by the given predicate descending
Declaration
public static IOrderableNotifyEnumerable<TItem> ThenByDescending<TItem, TKey>(this IOrderableNotifyEnumerable<TItem> source, Expression<Func<TItem, TKey>> keySelector, IComparer<TKey> comparer)
Parameters
Type | Name | Description |
---|---|---|
IOrderableNotifyEnumerable<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 |
---|---|
IOrderableNotifyEnumerable<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 |
ThenBy<TItem, TKey>(IOrderableNotifyEnumerable<TItem>, Expression<Func<TItem, TKey>>)
Orders the given orderable collection by the given predicate ascending
Declaration
public static IOrderableNotifyEnumerable<TItem> ThenBy<TItem, TKey>(this IOrderableNotifyEnumerable<TItem> source, Expression<Func<TItem, TKey>> keySelector)
Parameters
Type | Name | Description |
---|---|---|
IOrderableNotifyEnumerable<TItem> | source | The current collection |
Expression<Func<TItem, TKey>> | keySelector | A lambda expression to select the features used for ordering |
Returns
Type | Description |
---|---|
IOrderableNotifyEnumerable<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 |
ThenBy<TItem, TKey>(IOrderableNotifyEnumerable<TItem>, Expression<Func<TItem, TKey>>, IComparer<TKey>)
Orders the given orderable collection by the given predicate ascending
Declaration
public static IOrderableNotifyEnumerable<TItem> ThenBy<TItem, TKey>(this IOrderableNotifyEnumerable<TItem> source, Expression<Func<TItem, TKey>> keySelector, IComparer<TKey> comparer)
Parameters
Type | Name | Description |
---|---|---|
IOrderableNotifyEnumerable<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 |
---|---|
IOrderableNotifyEnumerable<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 |
TopX<TItem, TKey>(INotifyEnumerable<TItem>, int, Expression<Func<TItem, TKey>>)
Gets the top x elements of the given collection, ordered by the given feature
Declaration
[ObservableProxy(typeof(ObservableTopX<,>), "CreateSelector", false)]
public static KeyValuePair<TItem, TKey>[] TopX<TItem, TKey>(this INotifyEnumerable<TItem> source, int x, Expression<Func<TItem, TKey>> keySelector)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
TopX<TItem, TKey>(INotifyEnumerable<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<,>), "CreateSelectorComparer", false)]
public static KeyValuePair<TItem, TKey>[] TopX<TItem, TKey>(this INotifyEnumerable<TItem> source, int x, Expression<Func<TItem, TKey>> keySelector, IComparer<TKey> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<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 |
Union<TSource>(INotifyEnumerable<TSource>, IEnumerable<TSource>)
Unions the current collection with the given other collection
Declaration
public static INotifyEnumerable<TSource> Union<TSource>(this INotifyEnumerable<TSource> source, IEnumerable<TSource> source2)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The current collection |
IEnumerable<TSource> | source2 | The given other collection |
Returns
Type | Description |
---|---|
INotifyEnumerable<TSource> | A collection containing the union of both collections |
Type Parameters
Name | Description |
---|---|
TSource | The elements type |
Union<TSource>(INotifyEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)
Unions the current collection with the given other collection
Declaration
public static INotifyEnumerable<TSource> Union<TSource>(this INotifyEnumerable<TSource> source, IEnumerable<TSource> source2, IEqualityComparer<TSource> comparer)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<TSource> | source | The current collection |
IEnumerable<TSource> | source2 | The given other collection |
IEqualityComparer<TSource> | comparer | A comparer to determine equality |
Returns
Type | Description |
---|---|
INotifyEnumerable<TSource> | A collection containing the union of both collections |
Type Parameters
Name | Description |
---|---|
TSource | The elements type |
Where<T>(INotifyCollection<T>, Expression<Func<T, bool>>)
Filters the given collection with the given predicate
Declaration
public static INotifyCollection<T> Where<T>(this INotifyCollection<T> source, Expression<Func<T, bool>> filter)
Parameters
Type | Name | Description |
---|---|---|
INotifyCollection<T> | source | The current collection |
Expression<Func<T, bool>> | filter | The predicate used for filtering |
Returns
Type | Description |
---|---|
INotifyCollection<T> | A collection containing the elements that passed the filter |
Type Parameters
Name | Description |
---|---|
T | The element type |
Where<T>(INotifyCollection<T>, Expression<Func<T, bool>>, Func<T, bool>)
Filters the given collection with the given predicate
Declaration
public static INotifyCollection<T> Where<T>(this INotifyCollection<T> source, Expression<Func<T, bool>> filter, Func<T, bool> filterCompiled)
Parameters
Type | Name | Description |
---|---|---|
INotifyCollection<T> | source | The current collection |
Expression<Func<T, bool>> | filter | The predicate used for filtering |
Func<T, bool> | filterCompiled | A compiled version of filter |
Returns
Type | Description |
---|---|
INotifyCollection<T> | A collection containing the elements that passed the filter |
Type Parameters
Name | Description |
---|---|
T | The element type |
Where<T>(INotifyEnumerable<T>, Expression<Func<T, bool>>)
Filters the given collection with the given predicate
Declaration
public static INotifyEnumerable<T> Where<T>(this INotifyEnumerable<T> source, Expression<Func<T, bool>> filter)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<T> | source | The current collection |
Expression<Func<T, bool>> | filter | The predicate used for filtering |
Returns
Type | Description |
---|---|
INotifyEnumerable<T> | A collection containing the elements that passed the filter |
Type Parameters
Name | Description |
---|---|
T | The element type |
Where<T>(INotifyEnumerable<T>, Expression<Func<T, bool>>, Func<T, bool>)
Filters the given collection with the given predicate
Declaration
public static INotifyEnumerable<T> Where<T>(this INotifyEnumerable<T> source, Expression<Func<T, bool>> filter, Func<T, bool> filterCompiled)
Parameters
Type | Name | Description |
---|---|---|
INotifyEnumerable<T> | source | The current collection |
Expression<Func<T, bool>> | filter | The predicate used for filtering |
Func<T, bool> | filterCompiled | A compiled version of filter |
Returns
Type | Description |
---|---|
INotifyEnumerable<T> | A collection containing the elements that passed the filter |
Type Parameters
Name | Description |
---|---|
T | The element type |
WithUpdates<T>(ICollection<T>)
Fetches updates of the given collection
Declaration
public static INotifyCollection<T> WithUpdates<T>(this ICollection<T> source)
Parameters
Type | Name | Description |
---|---|---|
ICollection<T> | source | The current collection |
Returns
Type | Description |
---|---|
INotifyCollection<T> | The same collection as INotifyEnumerable |
Type Parameters
Name | Description |
---|---|
T | The element type |
WithUpdates<T>(IEnumerable<T>)
Fetches updates of the given collection
Declaration
public static INotifyEnumerable<T> WithUpdates<T>(this IEnumerable<T> source)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | source | The current collection |
Returns
Type | Description |
---|---|
INotifyEnumerable<T> | The same collection as INotifyEnumerable |
Type Parameters
Name | Description |
---|---|
T | The element type |