internal ObjectKey ReadKey(long position, int length) { byte[] buffer = new byte[this.keysLength]; this.ReadBuffer(buffer, position, length); MemoryStream input = new MemoryStream(buffer); BinaryReader reader = new BinaryReader(input); ObjectKey objectKey = new ObjectKey(this, null, null); objectKey.Read(reader, true); objectKey.position = position; return(objectKey); }
public override object Read(BinaryReader reader) { Dictionary <string, ObjectKey> dictionary = new Dictionary <string, ObjectKey>(); reader.ReadByte(); int num = reader.ReadInt32(); for (int i = 0; i < num; i++) { ObjectKey objectKey = new ObjectKey(); objectKey.Read(reader, true); dictionary.Add(objectKey.name, objectKey); } return(new ObjectKeyList(dictionary)); }
protected void ReadFree() { if (this.freeLength == 0) { return; } byte[] buffer = new byte[this.freeLength]; this.ReadBuffer(buffer, this.freePosition, this.freeLength); MemoryStream input = new MemoryStream(buffer); BinaryReader reader = new BinaryReader(input); ObjectKey objectKey = new ObjectKey(this, null, null); objectKey.Read(reader, true); objectKey.position = this.freePosition; this.free = ((FreeKeyList)objectKey.GetObject()).keys; this.freeListKey = objectKey; }
protected void ReadKeys() { if (this.keysLength == 0) { return; } byte[] buffer = new byte[this.keysLength]; this.ReadBuffer(buffer, this.keysPosition, this.keysLength); MemoryStream input = new MemoryStream(buffer); BinaryReader reader = new BinaryReader(input); ObjectKey objectKey = new ObjectKey(this, null, null); objectKey.Read(reader, true); objectKey.position = this.keysPosition; this.keys = ((ObjectKeyList)objectKey.GetObject()).keys; foreach (ObjectKey current in this.keys.Values) { current.Init(this); } this.keysListKey = objectKey; }