private void InternalSerialize(BinaryWriter writer) { lock (SyncRoot) { writer.Write(VERSION); writer.Write(ID); if (ID == Locator.MIN.ID) { return; } writer.Write(IsDeleted); writer.Write(Name); writer.Write(checked ((byte)StructureType)); //data types KeyDataType.Serialize(writer); RecordDataType.Serialize(writer); //types if (!DataTypeUtils.IsAnonymousType(KeyType)) { writer.Write(KeyType.FullName); } else { writer.Write(""); } if (!DataTypeUtils.IsAnonymousType(RecordType)) { writer.Write(RecordType.FullName); } else { writer.Write(""); } //key & record members WriteMembers(writer, keyMembers); WriteMembers(writer, recordMembers); //times writer.Write(CreateTime.Ticks); writer.Write(ModifiedTime.Ticks); writer.Write(AccessTime.Ticks); //tag if (Tag == null) { writer.Write(false); } else { writer.Write(true); CountCompression.Serialize(writer, (ulong)Tag.Length); writer.Write(Tag); } } }