You can now easily download the Dynamite package via NuGet by following this link:
Easy-to-use and high performance dynamic sorting library supporting SQL-like syntax and complex/nested expressions, that uses System.Linq.Expression to dynamically build fast comparers.
With this library you can sort a List<T> using a textual sort expression:
person.Sort("Name.Length, BirthDate DESCENDING");
You can also use LINQ style OrderBy like this:
// Print names ordered by year of birth (and then by Name).
foreach( Person p in persons.OrderBy("BirthDate.Year, Name")
Dynamite uses the System.Linq.Expression namespace to build and compile fast running comparer. Please read more about this library in the article below.
- Dynamite: High Performace Dynamic Sorting Using Expressions Article describing usage and design of Dynamite library.