public void Load(WTree tree, BinaryReader reader) { int count = (int)CountCompression.Deserialize(reader); Capacity = count; NodeType nodeType = (NodeType)reader.ReadByte(); for (int i = 0; i < count; i++) { //read fullKey var locator = tree.DeserializeLocator(reader); var key = locator.KeyPersist.Read(reader); var fullKey = new FullKey(locator, key); //read branch info long nodeID = reader.ReadInt64(); NodeState nodeState = (NodeState)reader.ReadInt32(); Branch branch = new Branch(tree, nodeType, nodeID); branch.NodeState = nodeState; branch.Cache.Load(tree, reader); Add(new KeyValuePair <FullKey, Branch>(fullKey, branch)); } }
public void Load(WTree tree, BinaryReader reader) { int count = reader.ReadInt32(); if (count == 0) return; for (int i = 0; i < count; i++) { //read locator var locator = tree.DeserializeLocator(reader); //read operations var operations = locator.OperationsPersist.Read(reader); Add(locator, operations); } }