The Priority class is used to create prioritization of items in a list.
var priority1 = new Priority();
var priority2 = new Priority();
var priority3 = new Priority();
priority1.Then(priority2).Then(priority3); // 1, 2, 3
priority3.Before(priority1); // 3, 1, 2
priority2.After(priority3); // 3, 2, 1
priority1.Remove(); // 3, 2
void List<T> GetPriorities<T>(List<T> items)
{
return items.OrderBy(x => x.Priority).ToList();
}