Example #1
0
        public Expression BuildAssign(Expression destination, Expression source, IMappingConfiguration configuration)
        {
            MemberInfo info = destinationMember;

            return(Expression.Assign(Expression.MakeMemberAccess(destination, info),
                                     sourceMemberResolver.BuildSource(source, info.GetMemberType(), configuration)));
        }
Example #2
0
        public LambdaExpression BuildNew(Type sourceType, Type destinationType)
        {
            var source = Expression.Parameter(sourceType, "src");

            return(Expression.Lambda(sourceMemberResolver.BuildSource(source, destinationType, this), source));
        }