/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
        private UUIDFieldMetadata.DatabaseIdentityIDAndUUID ReadDatabaseIdentityIDAndUUID
            (ObjectContainerBase container, ClassMetadata classMetadata, Slot oldSlot, bool
            checkClass)
        {
            if (DTrace.enabled)
            {
                DTrace.RereadOldUuid.LogLength(oldSlot.Address(), oldSlot.Length());
            }
            ByteArrayBuffer reader = container.DecryptedBufferByAddress(oldSlot.Address(), oldSlot
                                                                        .Length());

            if (checkClass)
            {
                ClassMetadata realClass = ClassMetadata.ReadClass(container, reader);
                if (realClass != classMetadata)
                {
                    return(null);
                }
            }
            if (classMetadata.SeekToField(container.Transaction, reader, this) == HandlerVersion
                .Invalid)
            {
                return(null);
            }
            return(new UUIDFieldMetadata.DatabaseIdentityIDAndUUID(reader.ReadInt(), reader.ReadLong
                                                                       ()));
        }
示例#2
0
 /// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
 private DatabaseIdentityIDAndUUID ReadDatabaseIdentityIDAndUUID
     (ObjectContainerBase container, ClassMetadata classMetadata, Slot oldSlot, bool
         checkClass)
 {
     if (DTrace.enabled)
     {
         DTrace.RereadOldUuid.LogLength(oldSlot.Address(), oldSlot.Length());
     }
     var reader = container.DecryptedBufferByAddress(oldSlot.Address(), oldSlot
         .Length());
     if (checkClass)
     {
         var realClass = ClassMetadata.ReadClass(container, reader);
         if (realClass != classMetadata)
         {
             return null;
         }
     }
     if (classMetadata.SeekToField(container.Transaction, reader, this) == HandlerVersion
         .Invalid)
     {
         return null;
     }
     return new DatabaseIdentityIDAndUUID(reader.ReadInt(), reader.ReadLong
         ());
 }