Exemplo n.º 1
0
        public static IEnumerable <Type> SortGeneralizedMethods
            (this IEnumerable <Type> source, List <List <Type> > priority)
        {
            var comparer = new ComparerGeneralizedMethods(priority);

            return(source.OrderBy(x => x, comparer));
        }
Exemplo n.º 2
0
        public static IEnumerable <TSource> SortGeneralizedMethods <TSource>
            (this IEnumerable <TSource> source, List <List <Type> > priority, Func <TSource, Type> keySelector)
        {
            source = source.ToList();
            var comparer = new ComparerGeneralizedMethods(priority);

            return(source.OrderBy(keySelector, comparer).ToList());
        }