public override void WriteUpdate(Transaction transaction, IUpdateDepth updatedepth ) { if (!this._firstUpdate) { base.WriteUpdate(transaction, updatedepth); return; } this._firstUpdate = false; ObjectContainerBase container = transaction.Container(); this.SetStateClean(); MarshallingContext context = new MarshallingContext(transaction, this, updatedepth , false); Handlers4.Write(this.ClassMetadata().TypeHandler(), context, this.GetObject()); int length = this.Container().BlockConverter().BlockAlignedBytes(context.MarshalledLength ()); Slot slot = context.AllocateNewSlot(length); Pointer4 pointer = new Pointer4(this.GetID(), slot); ByteArrayBuffer buffer = context.ToWriteBuffer(pointer); container.WriteUpdate(transaction, pointer, this.ClassMetadata(), ArrayType.None, buffer); if (this.IsActive()) { this.SetStateClean(); } }
public override void WriteUpdate(Transaction transaction, IUpdateDepth updatedepth ) { if (!_firstUpdate) { base.WriteUpdate(transaction, updatedepth); return; } _firstUpdate = false; var container = transaction.Container(); SetStateClean(); var context = new MarshallingContext(transaction, this, updatedepth , false); Handlers4.Write(ClassMetadata().TypeHandler(), context, GetObject()); var length = Container().BlockConverter().BlockAlignedBytes(context.MarshalledLength ()); var slot = context.AllocateNewSlot(length); var pointer = new Pointer4(GetID(), slot); var buffer = context.ToWriteBuffer(pointer); container.WriteUpdate(transaction, pointer, ClassMetadata(), ArrayType.None, buffer); if (IsActive()) { SetStateClean(); } }