public static IEnumerable <TSource> Union <TSource, TCompareKey>(this IEnumerable <TSource> first, IEnumerable <TSource> second, Func <TSource, TCompareKey> compareKeySelector) { return(first.Union(second, AnonymousComparer.Create(compareKeySelector))); }
public static bool SequenceEqual <TSource, TCompareKey>(this IEnumerable <TSource> first, IEnumerable <TSource> second, Func <TSource, TCompareKey> compareKeySelector) { return(first.SequenceEqual(second, AnonymousComparer.Create(compareKeySelector))); }
public static ILookup <TKey, TElement> ToLookup <TSource, TKey, TElement, TCompareKey>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector, Func <TSource, TElement> elementSelector, Func <TKey, TCompareKey> compareKeySelector) { return(source.ToLookup(keySelector, elementSelector, AnonymousComparer.Create(compareKeySelector))); }
public static IEnumerable <TResult> GroupBy <TSource, TKey, TElement, TResult, TCompareKey>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector, Func <TSource, TElement> elementSelector, Func <TKey, IEnumerable <TElement>, TResult> resultSelector, Func <TKey, TCompareKey> compareKeySelector) { return(source.GroupBy(keySelector, elementSelector, resultSelector, AnonymousComparer.Create(compareKeySelector))); }
public static IEnumerable <TResult> Join <TOuter, TInner, TKey, TResult, TCompareKey>(this IEnumerable <TOuter> outer, IEnumerable <TInner> inner, Func <TOuter, TKey> outerKeySelector, Func <TInner, TKey> innerKeySelector, Func <TOuter, TInner, TResult> resultSelector, Func <TKey, TCompareKey> compareKeySelector) { return(outer.Join(inner, outerKeySelector, innerKeySelector, resultSelector, AnonymousComparer.Create(compareKeySelector))); }
// IEqualityComparer<T> public static bool Contains <TSource, TCompareKey>(this IEnumerable <TSource> source, TSource value, Func <TSource, TCompareKey> compareKeySelector) { return(source.Contains(value, AnonymousComparer.Create(compareKeySelector))); }
public static IEnumerable <TSource> Distinct <TSource, TCompareKey>(this IEnumerable <TSource> source, Func <TSource, TCompareKey> compareKeySelector) { return(source.Distinct(AnonymousComparer.Create(compareKeySelector))); }
// IComparer<T> public static IOrderedEnumerable <TSource> OrderBy <TSource, TKey>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector, Func <TKey, TKey, int> compare) { return(source.OrderBy(keySelector, AnonymousComparer.Create(compare))); }
public static IOrderedEnumerable <TSource> ThenByDescending <TSource, TKey>(this IOrderedEnumerable <TSource> source, Func <TSource, TKey> keySelector, Func <TKey, TKey, int> compare) { return(source.ThenByDescending(keySelector, AnonymousComparer.Create(compare))); }
public static IImmutableList <TSource> Replace <TSource, TCompareKey>(this IImmutableList <TSource> source, TSource oldValue, TSource newValue, Func <TSource, TCompareKey> compareKeySelector) { return(source.Replace(oldValue, newValue, AnonymousComparer.Create(compareKeySelector))); }
public static IImmutableList <TSource> RemoveRange <TSource, TCompareKey>(this IImmutableList <TSource> source, IEnumerable <TSource> items, Func <TSource, TCompareKey> compareKeySelector) { return(source.RemoveRange(items, AnonymousComparer.Create(compareKeySelector))); }
public static IImmutableList <TSource> Remove <TSource, TCompareKey>(this IImmutableList <TSource> source, TSource value, Func <TSource, TCompareKey> compareKeySelector) { return(source.Remove(value, AnonymousComparer.Create(compareKeySelector))); }
public static int LastIndexOf <TSource, TCompareKey>(this IImmutableList <TSource> source, TSource item, int index, int count, Func <TSource, TCompareKey> compareKeySelector) { return(source.LastIndexOf(item, index, count, AnonymousComparer.Create(compareKeySelector))); }
public static IEnumerable <IGrouping <TKey, TElement> > GroupBy <TSource, TKey, TElement, TCompareKey>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector, Func <TSource, TElement> elementSelector, Func <TKey, TCompareKey> compareKeySelector) { return(source.GroupBy <TSource, TKey, TElement>(keySelector, elementSelector, AnonymousComparer.Create <TKey, TCompareKey>(compareKeySelector))); }