public static IEnumerable <Type> SortGeneralizedMethods (this IEnumerable <Type> source, List <List <Type> > priority) { var comparer = new ComparerGeneralizedMethods(priority); return(source.OrderBy(x => x, comparer)); }
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()); }