Esempio n. 1
0
        public T this[ulong index]
        {
            get
            {
                if (this.root == null)
                {
                    return(default(T));
                }

                return(this.root.GetValue(index));
            }

            set
            {
                if (this.root == null)
                {
                    this.root = new SparseArrayLeafNode <T>(index, this.nodesize);
                }

                this.root = this.root.SetValue(index, value);
            }
        }
Esempio n. 2
0
 internal void SetSlot(ulong position, ISparseArrayNode <T> subnode)
 {
     this.subnodes[this.GetSlotPosition(position)] = subnode;
 }