예제 #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))));
 }
예제 #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))));
 }