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

            var transformation = new Scenario2Solution();

            transformation.Initialize();

            Scenario2.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 <Scenario2.V2.Model.IPerson>(repository);

            CompletePhase("Load");

            var transformation = new Scenario2Solution();

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

            Scenario2.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);
        }