示例#1
0
		public sealed override MsgD GetWriter(StatefulBuffer bytes)
		{
			MsgD message = GetWriterForLength(bytes.Transaction(), bytes.Length() + Const4.IntLength
				);
			message._payLoad.WriteInt(bytes.GetAddress());
			message._payLoad.Append(bytes._buffer);
			return message;
		}
示例#2
0
        private object ReadIndexEntryForRebuild(StatefulBuffer writer, ObjectHeader oh)
        {
            ClassMetadata classMetadata = oh.ClassMetadata();

            if (classMetadata == null)
            {
                return(DefaultValueForFieldType());
            }
            ObjectIdContextImpl context = new ObjectIdContextImpl(writer.Transaction(), writer
                                                                  , oh, writer.GetID());

            if (!classMetadata.SeekToField(context, this))
            {
                return(DefaultValueForFieldType());
            }
            try
            {
                return(ReadIndexEntry(context));
            }
            catch (CorruptionException exc)
            {
                throw new FieldIndexException(exc, this);
            }
        }
 public DeleteContextImpl(Db4objects.Db4o.Internal.StatefulBuffer buffer, ObjectHeader
                          objectHeader, IReflectClass fieldClass, Config4Field fieldConfig) : base(buffer
                                                                                                   .Transaction(), buffer, objectHeader)
 {
     _fieldClass  = fieldClass;
     _fieldConfig = fieldConfig;
 }
示例#4
0
文件: MsgD.cs 项目: erdincay/db4o
		public virtual Db4objects.Db4o.CS.Internal.Messages.MsgD GetWriter(StatefulBuffer
			 bytes)
		{
			Db4objects.Db4o.CS.Internal.Messages.MsgD message = GetWriterForLength(bytes.Transaction
				(), bytes.Length());
			message._payLoad.Append(bytes._buffer);
			return message;
		}
示例#5
0
		/// <exception cref="Db4objects.Db4o.CorruptionException"></exception>
		/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
		public override object ReadIndexEntryFromObjectSlot(MarshallerFamily mf, StatefulBuffer
			 buffer)
		{
			return buffer.Container().ReadWriterByAddress(buffer.Transaction(), buffer.ReadInt
				(), buffer.ReadInt());
		}
示例#6
0
 private ArrayType ArrayTypeFor(StatefulBuffer buffer, object obj)
 {
     return buffer.Transaction().Container()._handlers.ArrayType(obj);
 }
示例#7
0
 internal void Delete(StatefulBuffer buffer, object obj)
 {
     RemoveFromIndex(buffer.Transaction(), buffer.GetID());
     CascadeDeletion(buffer, obj);
 }
示例#8
0
 public void AddFieldIndices(StatefulBuffer buffer)
 {
     if (!StandardReferenceTypeHandlerIsUsed())
     {
         return;
     }
     if (HasClassIndex() || HasVirtualAttributes())
     {
         var oh = new ObjectHeader(this, buffer);
         var context = new ObjectIdContextImpl(buffer.Transaction(), buffer
             , oh, buffer.GetID());
         Handlers4.FieldAwareTypeHandler(CorrectHandlerVersion(context)).AddFieldIndices(context
             );
     }
 }
		/// <exception cref="Db4objects.Db4o.CorruptionException"></exception>
		public object ReadIndexEntryFromObjectSlot(MarshallerFamily mf, StatefulBuffer statefulBuffer
			)
		{
			return ReadIndexEntry(statefulBuffer.Transaction().Context(), statefulBuffer);
		}
示例#10
0
 protected void AddIndexEntry(StatefulBuffer a_bytes, object indexEntry)
 {
     AddIndexEntry(a_bytes.Transaction(), a_bytes.GetID(), indexEntry);
 }
示例#11
0
		public sealed override MsgD GetWriter(StatefulBuffer buffer)
		{
			return GetWriter(buffer.Transaction(), buffer.Pointer(), buffer, null);
		}
		protected void AddIndexEntry(StatefulBuffer a_bytes, object indexEntry)
		{
			AddIndexEntry(a_bytes.Transaction(), a_bytes.GetID(), indexEntry);
		}
		private object ReadIndexEntryForRebuild(StatefulBuffer writer, ObjectHeader oh)
		{
			ClassMetadata classMetadata = oh.ClassMetadata();
			if (classMetadata == null)
			{
				return DefaultValueForFieldType();
			}
			ObjectIdContextImpl context = new ObjectIdContextImpl(writer.Transaction(), writer
				, oh, writer.GetID());
			if (!classMetadata.SeekToField(context, this))
			{
				return DefaultValueForFieldType();
			}
			try
			{
				return ReadIndexEntry(context);
			}
			catch (CorruptionException exc)
			{
				throw new FieldIndexException(exc, this);
			}
		}
示例#14
0
文件: MsgD.cs 项目: masroore/db4o
 public virtual MsgD GetWriter(StatefulBuffer
     bytes)
 {
     var message = GetWriterForLength(bytes.Transaction
         (), bytes.Length());
     message._payLoad.Append(bytes._buffer);
     return message;
 }