Ejemplo n.º 1
0
        public void AddPostAction <TSource, TTarget>(TypeFilterCondition sourceCondition, TypeFilterCondition targetCondition, Action <TSource, TTarget> action)
        {
            if (action == null)
            {
                return;
            }

            var condition = new MappingCondition();

            condition.Source.Type = typeof(TSource);
            condition.Source.TypeFilterCondition = sourceCondition;
            condition.Target.Type = typeof(TTarget);
            condition.Target.TypeFilterCondition = targetCondition;
            _PostActions.Add(new MapPostAction(condition, (Delegate)action));
        }
Ejemplo n.º 2
0
 public PropertyMappingRule()
 {
     this.Condition = new MappingCondition();
 }
Ejemplo n.º 3
0
 public MapPostAction(MappingCondition condition, Delegate action)
 {
     this.Condition = condition;
     this.Action = action;
 }
Ejemplo n.º 4
0
 public MapPostAction(MappingCondition condition, Delegate action)
 {
     this.Condition = condition;
     this.Action    = action;
 }