main
 1namespace MoMoney.boot.container.registration.mapping
 2{
 3    public class MappingStep<Input, Output, Type> : IMappingStep<Input, Output>
 4    {
 5        readonly ISourceEvaluator<Input, Type> input_evaluator;
 6        readonly ITargetAction<Output, Type> action_to_run_against_destination;
 7
 8        public MappingStep(ISourceEvaluator<Input, Type> source_evaluator, ITargetAction<Output, Type> target_action)
 9        {
10            input_evaluator = source_evaluator;
11            action_to_run_against_destination = target_action;
12        }
13
14        public void map(Input input, Output destination)
15        {
16            var value_pulled_from_input_item = input_evaluator.evaluate_against(input);
17            action_to_run_against_destination.act_against(destination, value_pulled_from_input_item);
18        }
19    }
20}