/// <summary> /// Sorts an array of <see cref="SccStamp"/> objects by their /// revision numbers in ascending or descending order. /// </summary> public static void SortByRevision(SccStamp[] stamps, bool descending) { IComparer comparer = new RevisionComparer(); if (descending) { comparer = new ReverseComparer(comparer); } Array.Sort(stamps, comparer); }
/// <summary> /// Sorts an array of <see cref="SccStamp"/> objects by their /// revision numbers in ascending or descending order. /// </summary> public static void SortByLastChanged(SccStamp[] stamps, bool descending) { IComparer comparer = new LastChangedComparer(); if (descending) { comparer = new ReverseComparer(comparer); } Array.Sort(stamps, comparer); }