public virtual void AddIndexEntry(FieldMetadata fieldMetadata, object obj)
 {
     if (!_currentBuffer.HasParent())
     {
         object indexEntry = (obj == _currentMarshalledObject) ? _currentIndexEntry : obj;
         if (_isNew || !UpdateDepth().CanSkip(_reference))
         {
             fieldMetadata.AddIndexEntry(Transaction(), ObjectID(), indexEntry);
         }
         return;
     }
     _currentBuffer.RequestIndexEntry(fieldMetadata);
 }
            protected override void ProcessAspect(ClassAspect aspect, int currentSlot, bool isNull
                                                  )
            {
                object marshalledObject = obj;

                if (aspect is FieldMetadata)
                {
                    FieldMetadata field = (FieldMetadata)aspect;
                    marshalledObject = field.GetOrCreate(trans, obj);
                    if (marshalledObject == null)
                    {
                        context.IsNull(currentSlot, true);
                        field.AddIndexEntry(trans, context.ObjectID(), null);
                        return;
                    }
                }
                aspect.Marshall(context, marshalledObject);
            }
 protected override void ProcessAspect(ClassAspect aspect, int currentSlot, bool isNull
                                       )
 {
     if (aspect is FieldMetadata)
     {
         FieldMetadata field = (FieldMetadata)aspect;
         if (isNull)
         {
             field.AddIndexEntry(context.Transaction(), context.ObjectId(), null);
         }
         else
         {
             field.AddFieldIndex(context);
         }
     }
     else
     {
         aspect.IncrementOffset(context.Buffer(), context);
     }
 }
Ejemplo n.º 4
0
 public virtual void AddIndexEntry(FieldMetadata fieldMetadata, object obj)
 {
     if (!_currentBuffer.HasParent())
     {
         var indexEntry = (obj == _currentMarshalledObject) ? _currentIndexEntry : obj;
         if (_isNew || !UpdateDepth().CanSkip(_reference))
         {
             fieldMetadata.AddIndexEntry(Transaction(), ObjectID(), indexEntry);
         }
         return;
     }
     _currentBuffer.RequestIndexEntry(fieldMetadata);
 }