Class EnumerableExtensions
Extension methods for the IEnumerable of T class
Inheritance
System.Object
EnumerableExtensions
Namespace: ImageVault.Common.Lib.Collections.Generic
Assembly: ImageVault.Common.dll
Syntax
public static class EnumerableExtensions : Object
Methods
DistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
Returns a distinct enumerable of the input enumerable
Declaration
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TSource> | source | The source enumerable to parse |
System.Func<TSource, TKey> | keySelector | The selector for checking for distinct keys |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TSource> | Enumerates all items from the source that are unique according to the keySelector. |
Type Parameters
Name | Description |
---|---|
TSource | The type to enumerate |
TKey | The key to filter by |