public object this[int index] {
     get {
         if (index < 0 || index >= this.Count)
         {
             throw new ArgumentOutOfRangeException();
         }
         return(SharpTreeNode.GetNodeByVisibleIndex(root, includeRoot ? index : index + 1));
     }
     set {
         throw new NotSupportedException();
     }
 }
Пример #2
0
        public object this[int index] {
            get {
                if (index < 0 || index >= this.Count)
                {
                    throw new ArgumentOutOfRangeException();
                }

                SharpTreeNode node;
                if (nodeCache.TryGetValue(index, out node))
                {
                    return(node);
                }

                node             = SharpTreeNode.GetNodeByVisibleIndex(root, includeRoot ? index : index + 1);
                nodeCache[index] = node;
                return(node);
            }
            set {
                throw new NotSupportedException();
            }
        }