예제 #1
0
		private ObjectHeader(ObjectContainerBase container, Db4objects.Db4o.Internal.ClassMetadata
			 classMetadata, IReadWriteBuffer reader)
		{
			int classID = reader.ReadInt();
			_marshallerFamily = ReadMarshallerFamily(reader, classID);
			classID = NormalizeID(classID);
			_classMetadata = (classMetadata != null ? classMetadata : container.ClassMetadataForID
				(classID));
			// This check has been added to cope with defragment in debug mode: SlotDefragment#setIdentity()
			// will trigger calling this constructor with a source db class metadata and a target db stream,
			// thus _classMetadata==null. There may be a better solution, since this call is just meant to
			// skip the object header.
			_headerAttributes = SlotFormat().ReadHeaderAttributes((ByteArrayBuffer)reader);
		}
예제 #2
0
        private ObjectHeader(ObjectContainerBase container, Db4objects.Db4o.Internal.ClassMetadata
                             classMetadata, IReadWriteBuffer reader)
        {
            int classID = reader.ReadInt();

            _marshallerFamily = ReadMarshallerFamily(reader, classID);
            classID           = NormalizeID(classID);
            _classMetadata    = (classMetadata != null ? classMetadata : container.ClassMetadataForID
                                     (classID));
            // This check has been added to cope with defragment in debug mode: SlotDefragment#setIdentity()
            // will trigger calling this constructor with a source db class metadata and a target db stream,
            // thus _classMetadata==null. There may be a better solution, since this call is just meant to
            // skip the object header.
            _headerAttributes = SlotFormat().ReadHeaderAttributes((ByteArrayBuffer)reader);
        }