public void Sort(IComparisonSorter <GeneralTree <T> > sorter, IComparer <GeneralTree <T> > comparer) { #region Validation Guard.ArgumentNotNull(sorter, "sorter"); Guard.ArgumentNotNull(comparer, "comparer"); #endregion childNodes.Sort(sorter, comparer); }
public void SortAllDescendants(IComparisonSorter <GeneralTree <T> > sorter, IComparer <GeneralTree <T> > comparer) { #region Validation Guard.ArgumentNotNull(sorter, "sorter"); Guard.ArgumentNotNull(comparer, "comparer"); #endregion childNodes.Sort(sorter, comparer); for (var i = 0; i < childNodes.Count; i++) { childNodes[i].SortAllDescendants(sorter, comparer); } }
public HuffmanCompressor(IComparisonSorter <ListNode> sorter, Translator translator) { this.sorter = sorter; this.translator = translator; }
/// <summary> /// Sorts using the specified sorter. /// </summary> /// <typeparam name="TElement">The type of the element.</typeparam> /// <param name="list">The list.</param> /// <param name="sorter">The sorter to use in the sorting process.</param> /// <param name="comparer">The comparer.</param> /// <exception cref="ArgumentNullException"><paramref name="sorter"/> is a null reference (<c>Nothing</c> in Visual Basic).</exception> /// <exception cref="ArgumentNullException"><paramref name="comparer"/> is a null reference (<c>Nothing</c> in Visual Basic).</exception> public static void Sort <TElement>(this IList <TElement> list, IComparisonSorter <TElement> sorter, IComparer <TElement> comparer) { Guard.ArgumentNotNull(sorter, "sorter"); sorter.Sort(list, comparer); }