Esempio n. 1
0
 private static Expression CreateSelect(IMappingConfiguration mappingConfiguration, Type sourceType, Type destinationType, Expression property, string methodName)
 {
     return(Expression.Call(typeof(Enumerable), methodName, new[] { destinationType },
                            Expression.Call(typeof(Enumerable), "Select",
                                            new[] { sourceType, destinationType },
                                            property, mappingConfiguration.BuildNew(sourceType, destinationType))));
 }
 private static Expression CreateSelect(IMappingConfiguration mappingConfiguration, Type sourceType, Type destinationType, Expression property, string methodName)
 {
     return Expression.Call(typeof (Enumerable), methodName, new[] {destinationType},
                            Expression.Call(typeof (Enumerable), "Select",
                                            new[] {sourceType, destinationType},
                                            property, mappingConfiguration.BuildNew(sourceType, destinationType)));
 }
Esempio n. 3
0
 protected static Func <TSource, TDestination> Compile <TSource, TDestination>(IMappingConfiguration configuration)
 {
     return((Func <TSource, TDestination>)configuration.BuildNew(typeof(TSource), typeof(TDestination)).Compile());
 }