Class EnumerableExtensions
Extension methods for the IEnumerable of T class
Inheritance
System.Object
EnumerableExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ImageVault.Common.Lib.Collections.Generic
Assembly: ImageVault.Common.dll
Syntax
public static class EnumerableExtensions
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 |