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; }
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; }
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; }
/// <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()); }
private ArrayType ArrayTypeFor(StatefulBuffer buffer, object obj) { return buffer.Transaction().Container()._handlers.ArrayType(obj); }
internal void Delete(StatefulBuffer buffer, object obj) { RemoveFromIndex(buffer.Transaction(), buffer.GetID()); CascadeDeletion(buffer, obj); }
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); }
protected void AddIndexEntry(StatefulBuffer a_bytes, object indexEntry) { AddIndexEntry(a_bytes.Transaction(), a_bytes.GetID(), indexEntry); }
public sealed override MsgD GetWriter(StatefulBuffer buffer) { return GetWriter(buffer.Transaction(), buffer.Pointer(), buffer, null); }
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 virtual MsgD GetWriter(StatefulBuffer bytes) { var message = GetWriterForLength(bytes.Transaction (), bytes.Length()); message._payLoad.Append(bytes._buffer); return message; }