示例#1
0
        public override void Run()
        {
            var repository = new ModelRepository();
            var input      = LoadModel <Scenario3.V2.Model.Person>(repository);

            var transformation = new Scenario3Solution();

            transformation.Initialize();

            Scenario3.V1.Model.Person result = null;
            transformation.Synchronize(ref result, ref input, SynchronizationDirection.RightToLeftForced, ChangePropagationMode.None);
            transformation.Synchronize(ref result, ref input, SynchronizationDirection.LeftToRightForced, ChangePropagationMode.None);

            repository.Save(input, Output);
        }
示例#2
0
        public override void Run(int iterations)
        {
            var repository = new ModelRepository();
            var input      = LoadModel <Scenario3.V2.Model.IPerson>(repository);

            CompletePhase("Load");

            var transformation = new Scenario3Solution();

            transformation.Initialize();
            CompletePhase("Initialize");

            Scenario3.V1.Model.IPerson result = null;
            for (int i = 0; i < Iterations; i++)
            {
                transformation.Synchronize(ref result, ref input, SynchronizationDirection.RightToLeftForced, ChangePropagationMode.None);
                transformation.Synchronize(ref result, ref input, SynchronizationDirection.LeftToRightForced, ChangePropagationMode.None);
            }
            CompletePhase("Transformation");
            repository.Save(input, Output);
        }