From: Jérémie Laval Date: Wed, 5 Sep 2012 13:36:58 +0000 (+0100) Subject: [System.Core] Remove a source of generic indirection for GroupBy X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=02d23e2e36b08923efea18a36be30b78ee3ab01a;p=mono.git [System.Core] Remove a source of generic indirection for GroupBy --- diff --git a/mcs/class/System.Core/System.Linq/ParallelEnumerable.cs b/mcs/class/System.Core/System.Linq/ParallelEnumerable.cs index 6d9e637b4c9..63eea9afd95 100644 --- a/mcs/class/System.Core/System.Linq/ParallelEnumerable.cs +++ b/mcs/class/System.Core/System.Linq/ParallelEnumerable.cs @@ -608,7 +608,7 @@ namespace System.Linq Func keySelector, IEqualityComparer comparer) { - return source.GroupBy (keySelector, (e) => e, comparer); + return source.GroupBy (keySelector, new Identity ().Apply, comparer); } public static ParallelQuery> GroupBy (this ParallelQuery source, @@ -2243,6 +2243,17 @@ namespace System.Linq throw new NotSupportedException (); } #endregion + + #region Helpers + + class Identity + { + public T Apply (T input) + { + return input; + } + } + #endregion } } #endif