示例#1
0
 public void ApplyUpdates(object container, TElement obj)
 {
     if (null != this.EntityUpdates)
     {
         this.EntityUpdates.Run(container, obj);
         this.EntityUpdates = null;
     }
 }
示例#2
0
 public EntityUpdation(Expression <Func <TContainer, IEnumerable <TElement> > > collectionSelector, Action <TElement, TContainer> entityUpdateReferencingParent,
                       IModification[] innerUpdates)
 {
     this.FieldReference = new FieldReference <TContainer, TElement>(collectionSelector);
     this.EntityUpdates  = new EntityUpdateFunc <TElement, TContainer>(entityUpdateReferencingParent);
     if (null != innerUpdates)
     {
         EntityFieldModifications.AddRange(innerUpdates);
     }
 }
示例#3
0
 public EntityUpdation(Expression <Func <TContainer, TElement> > fieldSelector, Action <TElement> entityUpdate,
                       IModification[] innerUpdates)
 {
     this.FieldReference = new FieldReference <TContainer, TElement>(fieldSelector);
     this.EntityUpdates  = new EntityUpdateFunc <TElement, TContainer>(entityUpdate);
     if (null != innerUpdates)
     {
         EntityFieldModifications.AddRange(innerUpdates);
     }
 }