public override IElement this[int index] { get { ChildrenList.Sort(Comparer); return(ChildrenList[index]); } }
/// <summary> /// Order this node's children with an item comparer /// </summary> /// <param name="itemComparer"></param> public virtual void OrderChildren(IComparer <TItem> itemComparer) { var comparer = new NodeOrderItemComparer <TNode, TItem>(itemComparer); ChildrenList.Sort(comparer); SetChildrenSiblingReferences(); OnChildrenReordered(); }
private int IndexOf(string name) { ChildrenList.Sort(Comparer); return(ChildrenList.BinarySearch(GetNamedElement(name), Comparer)); }