Beispiel #1
0
        //public int Run(CheckPointOptions options)
        //{
        //    throw new NotImplementedException();
        //}

        public int Run(IEvolutionTargetable targetedEvolution)
        {
            //TODO Add logic to run up to a specific evolution
            try
            {
                var executedEvolutions       = _EvolutionRepo.GetExecutedEvolutionFileNames();
                var unexecutedEvolutionFiles = _FileRepo.GetUnexecutedEvolutionFiles(executedEvolutions);

                string          fileContents;
                Model.Evolution evolution;

                foreach (var evolutionFile in unexecutedEvolutionFiles)
                {
                    evolution = new Model.Evolution(evolutionFile);

                    fileContents = _FileRepo.GetEvolutionFileContent(evolution);
                    _EvolutionRepo.ExecuteEvolution(fileContents);
                    _EvolutionRepo.AddEvolution(evolution, fileContents);
                }

                return(0);
            }
            catch (Exception ex)
            {
                Console.WriteLine(GetExceptions(ex));
                return(1);
            }
        }