Esempio n. 1
0
        private long FileHeaderUsage()
        {
            int headerLength = _db.GetFileHeader().Length();
            int usage        = _blockConverter.BlockAlignedBytes(headerLength);
            FileHeaderVariablePart2 variablePart = (FileHeaderVariablePart2)FieldValue(_db.GetFileHeader
                                                                                           (), "_variablePart");

            usage += _blockConverter.BlockAlignedBytes(variablePart.MarshalledLength());
            _slots.Add(new Db4objects.Db4o.Internal.Slots.Slot(0, headerLength));
            _slots.Add(new Db4objects.Db4o.Internal.Slots.Slot(variablePart.Address(), variablePart
                                                               .MarshalledLength()));
            return(usage);
        }