internal Dictionary <string, List <PeriodConfiguration> > Parse(CalendariumConfiguration countries)
        {
            _defaults = countries.Defaults.ToDictionary(c => c.Country);

            foreach (var country in countries)
            {
                Parse(country);
            }

            return(_dic);
        }
Exemple #2
0
        public static CalendariumConfiguration GetCalendarium(params DefaultCountryConfiguration[] defaults)
        {
            CalendariumConfiguration countries = new CalendariumConfiguration();

            foreach (var item in defaults)
            {
                if (item is CountryConfiguration country)
                {
                    countries.Add(country);
                }
                else
                {
                    countries.Defaults.Add(item);
                }
            }

            countries.Initialize();

            return(countries);
        }