public static IEnumerable <TResult> GroupJoin <TOuter, TInner, TKey, TResult>(this IEnumerable <TOuter> outer, IEnumerable <TInner> inner, Func <TOuter, TKey> outerKeySelector, Func <TInner, TKey> innerKeySelector, Func <TOuter, IEnumerable <TInner>, TResult> resultSelector, IEqualityComparer <TKey> comparer) { LinqCheck.JoinSelectors(outer, inner, outerKeySelector, innerKeySelector, resultSelector); if (comparer == null) { comparer = EqualityComparer <TKey> .Default; } return(CreateGroupJoinIterator(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer)); }
public static IOrderedEnumerable <TSource> ThenByDescending <TSource, TKey>(this IOrderedEnumerable <TSource> source, Func <TSource, TKey> keySelector, IComparer <TKey> comparer) { LinqCheck.SourceAndKeySelector(source, keySelector); var oe = source as OrderedEnumerable <TSource>; if (oe != null) { return(oe.CreateOrderedEnumerable(keySelector, comparer, true)); } return(source.CreateOrderedEnumerable(keySelector, comparer, true)); }
public static IEnumerable <TResult> GroupBy <TSource, TKey, TElement, TResult>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector, Func <TSource, TElement> elementSelector, Func <TKey, IEnumerable <TElement>, TResult> resultSelector, IEqualityComparer <TKey> comparer) { LinqCheck.GroupBySelectors(source, keySelector, elementSelector, resultSelector); return(CreateGroupByIterator(source, keySelector, elementSelector, resultSelector, comparer)); }
public static IOrderedEnumerable <TSource> OrderByDescending <TSource, TKey>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector, IComparer <TKey> comparer) { LinqCheck.SourceAndKeySelector(source, keySelector); return(new OrderedSequence <TSource, TKey>(source, keySelector, comparer, SortDirection.Descending)); }
public static IEnumerable <IGrouping <TKey, TElement> > GroupBy <TSource, TKey, TElement>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector, Func <TSource, TElement> elementSelector, IEqualityComparer <TKey> comparer) { LinqCheck.SourceAndKeyElementSelectors(source, keySelector, elementSelector); return(CreateGroupByIterator(source, keySelector, elementSelector, comparer)); }