Exemplo n.º 1
0
 public void ApplyUpdates(object container, TElement obj)
 {
     if (null != this.EntityUpdates)
     {
         this.EntityUpdates.Run(container, obj);
         this.EntityUpdates = null;
     }
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
     }
 }