private static ScheduleDefinitionConfiguration GetScheduleDefinitionConfiguration(string scheduleDefinitionName)
        {
            foreach (ScheduleDefinitionConfigurationElement scheduleDefinitionConfigurationElement in StealFocusForecastConfiguration.Instance.ScheduleDefinitions)
            {
                if (scheduleDefinitionConfigurationElement.Name == scheduleDefinitionName)
                {
                    ScheduleDefinitionConfiguration scheduleDefinitionConfiguration = new ScheduleDefinitionConfiguration();
                    scheduleDefinitionConfiguration.Name = scheduleDefinitionConfigurationElement.Name;
                    foreach (DayConfigurationElement dayConfigurationElement in scheduleDefinitionConfigurationElement.Days)
                    {
                        DayConfiguration dayConfiguration = new DayConfiguration();
                        dayConfiguration.DayOfWeek = dayConfigurationElement.GetDayOfWeek();
                        dayConfiguration.EndTime   = dayConfigurationElement.EndTime;
                        dayConfiguration.StartTime = dayConfigurationElement.StartTime;
                        scheduleDefinitionConfiguration.Days.Add(dayConfiguration);
                    }

                    return(scheduleDefinitionConfiguration);
                }
            }

            string exceptionMessage = string.Format(CultureInfo.CurrentCulture, "The required schedule definition name of '{0}' was not found in the set of schedule definitions.", scheduleDefinitionName);

            throw new ForecastException(exceptionMessage);
        }
        private static ScheduleDefinitionConfiguration GetScheduleDefinitionConfiguration(string scheduleDefinitionName)
        {
            foreach (ScheduleDefinitionConfigurationElement scheduleDefinitionConfigurationElement in StealFocusForecastConfiguration.Instance.ScheduleDefinitions)
            {
                if (scheduleDefinitionConfigurationElement.Name == scheduleDefinitionName)
                {
                    ScheduleDefinitionConfiguration scheduleDefinitionConfiguration = new ScheduleDefinitionConfiguration();
                    scheduleDefinitionConfiguration.Name = scheduleDefinitionConfigurationElement.Name;
                    foreach (DayConfigurationElement dayConfigurationElement in scheduleDefinitionConfigurationElement.Days)
                    {
                        DayConfiguration dayConfiguration = new DayConfiguration();
                        dayConfiguration.DayOfWeek = dayConfigurationElement.GetDayOfWeek();
                        dayConfiguration.EndTime = dayConfigurationElement.EndTime;
                        dayConfiguration.StartTime = dayConfigurationElement.StartTime;
                        scheduleDefinitionConfiguration.Days.Add(dayConfiguration);
                    }

                    return scheduleDefinitionConfiguration;
                }
            }

            string exceptionMessage = string.Format(CultureInfo.CurrentCulture, "The required schedule definition name of '{0}' was not found in the set of schedule definitions.", scheduleDefinitionName);
            throw new ForecastException(exceptionMessage);
        }