diff options
author | Jb Evain <jbevain@gmail.com> | 2008-05-02 00:21:56 +0400 |
---|---|---|
committer | Jb Evain <jbevain@gmail.com> | 2008-05-02 00:21:56 +0400 |
commit | cef7704cc53e277f484210a86105d4d9eb29a3c9 (patch) | |
tree | 3d082feac10356b480171d315675433ffaa07ec0 /mcs/class/System.Core/System.Linq/Enumerable.cs | |
parent | 7796030c3b64d835ba2f8beb9372fa3381358b3e (diff) |
2008-05-01 Jb Evain <jbevain@novell.com>
* SortDirection.cs, SortContext.cs, SortSequenceContext.cs:
new infrastructure files for nested orderby/thenby calls.
* QuickSort.cs: refactored out of OrderedSequence.cs
* OrderedEnumerable.cs, OrderedSequence.cs: refactoring
to use the new SortContext infrastructure.
svn path=/trunk/mcs/; revision=102297
Diffstat (limited to 'mcs/class/System.Core/System.Linq/Enumerable.cs')
-rw-r--r-- | mcs/class/System.Core/System.Linq/Enumerable.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mcs/class/System.Core/System.Linq/Enumerable.cs b/mcs/class/System.Core/System.Linq/Enumerable.cs index d243ff7c327..3cad6b08da7 100644 --- a/mcs/class/System.Core/System.Linq/Enumerable.cs +++ b/mcs/class/System.Core/System.Linq/Enumerable.cs @@ -1603,7 +1603,6 @@ namespace System.Linq return OrderBy<TSource, TKey> (source, keySelector, null); } - public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey> (this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer) @@ -1611,7 +1610,7 @@ namespace System.Linq Check.SourceAndKeySelector (source, keySelector); return new OrderedSequence<TSource, TKey> ( - source, keySelector, comparer, false); + source, keySelector, comparer, SortDirection.Ascending); } #endregion @@ -1624,14 +1623,13 @@ namespace System.Linq return OrderByDescending<TSource, TKey> (source, keySelector, null); } - public static IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey> (this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer) { Check.SourceAndKeySelector (source, keySelector); return new OrderedSequence<TSource, TKey> ( - source, keySelector, comparer, true); + source, keySelector, comparer, SortDirection.Descending); } #endregion @@ -2207,7 +2205,6 @@ namespace System.Linq return ThenBy<TSource, TKey> (source, keySelector, null); } - public static IOrderedEnumerable<TSource> ThenBy<TSource, TKey> (this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer) { @@ -2226,7 +2223,6 @@ namespace System.Linq return ThenByDescending<TSource, TKey> (source, keySelector, null); } - public static IOrderedEnumerable<TSource> ThenByDescending<TSource, TKey> (this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer) { |