Exemplo n.º 1
0
 public static ICollection <TTarget> Map <TSource, TTarget>(this IEnumerable <TSource> source, ICollection <TTarget> target, Func <TTarget> elementConstructor, MappingContext context)
 {
     return(ObjectMapConfig.Current.Map(source, target, elementConstructor, context));
 }
Exemplo n.º 2
0
 private IEnumerable <TTarget> Map <TSource, TTarget>(IEnumerable <TSource> source, Func <TTarget> constructor, MappingContext context)
 {
     return(source.Select(el => el.Map(constructor())));
 }
Exemplo n.º 3
0
 public static ICollection <TTarget> Map <TSource, TTarget>(this IEnumerable <TSource> source, ICollection <TTarget> target, MappingContext context)
     where TTarget : new()
 {
     return(ObjectMapConfig.Current.Map(source, target, () => new TTarget(), context));
 }