Ejemplo n.º 1
0
 public Lens <TParent, TProperty> Compose <TParent>(Lens <TParent, TEntity> otherLens)
 {
     return(new Lens <TParent, TProperty>((pe, p) => otherLens.Set(pe, Set(otherLens.Get(pe), p)), pe => Get(otherLens.Get(pe))));
 }
Ejemplo n.º 2
0
 public Lens <TEntity, TChildProperty> AndThen <TChildProperty>(Lens <TProperty, TChildProperty> otherLens)
 {
     return(new Lens <TEntity, TChildProperty>((e, cpv) => Set(e, otherLens.Set(_accessor(e), cpv)), e => otherLens.Get(_accessor(e))));
 }