BplusDotNet.BplusTreeBytes.this C# (CSharp) Method

this() public method

public this ( string key ) : byte[]
key string
return byte[]
        public byte[] this[string key]
        {
            set
            {
                long storage = this.archive.StoreNewChunk(value, 0, value.Length);
                //this.FreeChunksOnAbort.Add(storage);
                this.FreeChunksOnAbort[storage] = storage;
                long valueFound;
                if (this.tree.ContainsKey(key, out valueFound))
                {
                    //this.archive.ReleaseBuffers(valueFound);
                    if (this.FreeChunksOnAbort.ContainsKey(valueFound))
                    {
                        // free it now
                        this.FreeChunksOnAbort.Remove(valueFound);
                        this.archive.ReleaseBuffers(valueFound);
                    }
                    else
                    {
                        // release at commit.
                        this.FreeChunksOnCommit[valueFound] = valueFound;
                    }
                }
                this.tree[key] = storage;
            }
            get
            {
                long map = this.tree[key];
                return this.archive.GetChunk(map);
            }
        }