private void Serialize(BinaryWriter writer) { maxPositionPlusSize = AtomicHeader.SIZE; writer.Write(maxHandle); writer.Write(currentVersion); //write free space.Serialize(writer); //write used writer.Write(used.Count); foreach (var kv in used) { writer.Write(kv.Key); kv.Value.Serialize(writer); long posPlusSize = kv.Value.Ptr.PositionPlusSize; if (posPlusSize > maxPositionPlusSize) { maxPositionPlusSize = posPlusSize; } } //write reserved writer.Write(reserved.Count); foreach (var kv in reserved) { writer.Write(kv.Key); kv.Value.Serialize(writer); long posPlusSize = kv.Value.Ptr.PositionPlusSize; if (posPlusSize > maxPositionPlusSize) { maxPositionPlusSize = posPlusSize; } } }
private void Serialize(BinaryWriter writer) { writer.Write(maxHandle); writer.Write(currentVersion); //write free space.Serialize(writer); //write used writer.Write(used.Count); foreach (var kv in used) { writer.Write(kv.Key); kv.Value.Serialize(writer); } //write reserved writer.Write(reserved.Count); foreach (var kv in reserved) { writer.Write(kv.Key); kv.Value.Serialize(writer); } }