Esempio n. 1
0
        private IEnumerable <TimePeriod> GetRushHours()
        {
            string rushHourConfiguration = _configurationReader.GetConfigValue <string>("SEGMENT_RUSH_HOURS", false, null);

            return(TimePeriod.ParseList(rushHourConfiguration));
        }
 public bool IsRushHour(DateTime timeToEvaluate, out TimePeriod currentRushHour)
 {
     currentRushHour = RushHours.FirstOrDefault(rushHour => rushHour.Includes(timeToEvaluate));
     return(currentRushHour != null);
 }