예제 #1
0
 Expression SetValue(MappingStrategy strategy, ConversionStep conversion, Expression value)
 {
     strategy.ValueExpression = value;
     if (conversion != null)
     {
         var convert = conversion.BuildConversionExpression(strategy);
         strategy.ValueExpression = convert;
     }
     return(BuildSetTargetValueExpression(strategy));
 }
예제 #2
0
        public override Expression Apply(MappingStrategy strategy, ConversionStep conversion)
        {
            var get = Expression.Property(strategy.SourceExpression, sourceProperty);

            strategy.ValueExpression = get;
            if (conversion != null)
            {
                var convert = conversion.BuildConversionExpression(strategy);
                strategy.ValueExpression = convert;
            }
            return(strategy.ValueExpression);
        }
예제 #3
0
 public override Expression Apply(MappingStrategy strategy, ConversionStep conversion)
 {
     var get = Expression.Property(strategy.SourceExpression, sourceProperty);
     strategy.ValueExpression = get;
     if (conversion != null)
     {
         var convert = conversion.BuildConversionExpression(strategy);
         strategy.ValueExpression = convert;
     }
     var property = Expression.Property(strategy.TargetExpression, targetProperty);
     return Expression.Assign(property, strategy.ValueExpression);
 }
예제 #4
0
 public override Expression Apply(MappingStrategy strategy, ConversionStep conversion)
 {
     strategy.ValueExpression = strategy.SourceExpression;
     return(conversion.BuildConversionExpression(strategy));
 }
예제 #5
0
 Expression SetValue(MappingStrategy strategy, ConversionStep conversion, Expression value)
 {
     strategy.ValueExpression = value;
     if (conversion != null)
     {
         var convert = conversion.BuildConversionExpression(strategy);
         strategy.ValueExpression = convert;
     }
     return BuildSetTargetValueExpression(strategy);
 }
예제 #6
0
 public override Expression Apply(MappingStrategy strategy, ConversionStep conversion)
 {
     strategy.ValueExpression = strategy.SourceExpression;
     return conversion.BuildConversionExpression(strategy);
 }