mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
3a445ba3de
* re-added taskbar icon overlays and progress bars * got rid of the token button in ThreadWindow; moved to ThreadList context menu git-svn-id: svn://svn.code.sf.net/p/processhacker/code@1948 21ef857c-d57f-4fe0-8362-d861dc6d29cd
74 lines
2.1 KiB
C#
74 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace System.Linq
|
|
{
|
|
public static partial class Enumerable
|
|
{
|
|
// OrderBy:
|
|
|
|
public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey> (
|
|
this IEnumerable<TSource> source,
|
|
Func<TSource, TKey> keySelector)
|
|
{
|
|
return OrderBy (source, keySelector, null);
|
|
}
|
|
|
|
public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey> (
|
|
this IEnumerable<TSource> source,
|
|
Func<TSource, TKey> keySelector,
|
|
IComparer<TKey> comparer)
|
|
{
|
|
return new OrderByEnumerable<TSource, TKey> (source, keySelector, null, false);
|
|
}
|
|
|
|
public static IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey> (
|
|
this IEnumerable<TSource> source,
|
|
Func<TSource, TKey> keySelector)
|
|
{
|
|
return OrderByDescending (source, keySelector, null);
|
|
}
|
|
|
|
public static IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey> (
|
|
this IEnumerable<TSource> source,
|
|
Func<TSource, TKey> keySelector,
|
|
IComparer<TKey> comparer)
|
|
{
|
|
return new OrderByEnumerable<TSource, TKey> (source, keySelector, null, true);
|
|
}
|
|
|
|
// ThenBy:
|
|
|
|
public static IOrderedEnumerable<TSource> ThenBy<TSource, TKey> (
|
|
this IOrderedEnumerable<TSource> source,
|
|
Func<TSource, TKey> keySelector)
|
|
{
|
|
return ThenBy (source, keySelector, null);
|
|
}
|
|
|
|
public static IOrderedEnumerable<TSource> ThenBy<TSource, TKey> (
|
|
this IOrderedEnumerable<TSource> source,
|
|
Func<TSource, TKey> keySelector,
|
|
IComparer<TKey> comparer)
|
|
{
|
|
return source.CreateOrderedEnumerable<TKey> (keySelector, comparer, false);
|
|
}
|
|
|
|
public static IOrderedEnumerable<TSource> ThenByDescending<TSource, TKey> (
|
|
this IOrderedEnumerable<TSource> source,
|
|
Func<TSource, TKey> keySelector)
|
|
{
|
|
return ThenByDescending (source, keySelector, null);
|
|
}
|
|
|
|
public static IOrderedEnumerable<TSource> ThenByDescending<TSource, TKey> (
|
|
this IOrderedEnumerable<TSource> source,
|
|
Func<TSource, TKey> keySelector,
|
|
IComparer<TKey> comparer)
|
|
{
|
|
return source.CreateOrderedEnumerable<TKey> (keySelector, comparer, true);
|
|
}
|
|
}
|
|
}
|