Esempio n. 1
0
 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();
        }
Esempio n. 3
0
 private int IndexOf(string name)
 {
     ChildrenList.Sort(Comparer);
     return(ChildrenList.BinarySearch(GetNamedElement(name), Comparer));
 }