Esempio n. 1
0
        public static MyComparerBuilder AnnieOrderBy <TKey>(this IEnumerable <Employee> employees,
                                                            Func <Employee, TKey> keySelector)
        {
            var comparer = new KeyComparePair <TKey>(keySelector, Comparer <TKey> .Default);

            return(new MyComparerBuilder(employees, comparer));
        }
Esempio n. 2
0
        public static MyComparerBuilder AnnieThenBy <TKey>(this MyComparerBuilder myComparerBuilder,
                                                           Func <Employee, TKey> keySelector)
        {
            var comparer = new KeyComparePair <TKey>(keySelector, Comparer <TKey> .Default);

            return(myComparerBuilder.AppendComparer(comparer));
        }