using System; using System.Collections.Generic; using System.Linq; namespace CaoCao.Editor { internal static class ExtensionMethods { internal static IOrderedEnumerable Order(this IEnumerable source, Func selector, bool ascending) { return ascending ? source.OrderBy(selector) : source.OrderByDescending(selector); } } }