Ejemplo n.º 1
0
 /// <summary>Returns all internal mappings from the mapper.</summary>
 /// <returns>
 ///     An enumerator that allows foreach to be used to get mappings in this collection.
 /// </returns>
 protected internal override IEnumerable <MemberMappingInfo <TSource, TTarget> > GetMappings()
 {
     return(InnerMappers.OfType <BaseMapper <TSource, TTarget> >()
            .Select(mapper => mapper.GetMappings())
            .Where(mappings => mappings != null)
            .SelectMany(mappings => mappings));
 }
Ejemplo n.º 2
0
 public static T Map <S, T>(this S source) where T : class
     where S : class
 {
     return(InnerMappers.Map <T>(source));
 }