public static ScenarioBusiness Map(ScenarioDao scenario)
 {
     return(new ScenarioBusiness
     {
         Id = scenario.Id,
         Title = scenario.Title
     });
 }
Beispiel #2
0
        public RandomEventsScenario(DateTime startDate, string path)
        {
            ScenarioDao scenario = XmlUtils.LoadScenario(path);

            _converter = new DaoToEventsConverter();
            _events    = scenario.Events;
            Random r = new Random();

            //permutate sequence 1..n
            _eventIndexQueue = new Queue <int>(Enumerable.Range(0, _events.Length).OrderBy(x => r.Next()));
            _lastDate        = startDate;
            PrepareNextEvent();
        }