コード例 #1
0
        protected virtual void ReadBuffer(ByteArrayBuffer buffer, bool versionsAreConsistent
                                          )
        {
            buffer.IncrementOffset(ChecksumLength);
            SystemData systemData = SystemData();

            systemData.IdSystemSlot(ReadSlot(buffer, false));
            systemData.InMemoryFreespaceSlot(ReadSlot(buffer, !versionsAreConsistent));
            systemData.BTreeFreespaceId(buffer.ReadInt());
            systemData.ConverterVersion(buffer.ReadInt());
            systemData.UuidIndexId(buffer.ReadInt());
            systemData.IdentityId(buffer.ReadInt());
            systemData.LastTimeStampID(buffer.ReadLong());
            systemData.FreespaceSystem(buffer.ReadByte());
        }
コード例 #2
0
        protected virtual void WriteBuffer(ByteArrayBuffer buffer, bool shuttingDown)
        {
            SystemData systemData = SystemData();

            WriteSlot(buffer, systemData.IdSystemSlot(), false);
            WriteSlot(buffer, systemData.InMemoryFreespaceSlot(), !shuttingDown);
            buffer.WriteInt(systemData.BTreeFreespaceId());
            buffer.WriteInt(systemData.ConverterVersion());
            buffer.WriteInt(systemData.UuidIndexId());
            Db4oDatabase identity = systemData.Identity();

            buffer.WriteInt(identity == null ? 0 : identity.GetID(_container.SystemTransaction
                                                                      ()));
            buffer.WriteLong(systemData.LastTimeStampID());
            buffer.WriteByte(systemData.FreespaceSystem());
        }