Func<TSource, TKey> keySelector,
IEqualityComparer<TKey> comparer)
{
- return source.GroupBy (keySelector, (e) => e, comparer);
+ return source.GroupBy (keySelector, new Identity<TSource> ().Apply, comparer);
}
public static ParallelQuery<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement> (this ParallelQuery<TSource> source,
throw new NotSupportedException ();
}
#endregion
+
+ #region Helpers
+
+ class Identity<T>
+ {
+ public T Apply (T input)
+ {
+ return input;
+ }
+ }
+ #endregion
}
}
#endif