Esempio n. 1
0
        /// <inherit/>
        public void Validate()
        {
            Validator.ValidateObject(this, new ValidationContext(this), true);

            bool valid = GenericHelper.IsGenericCulture(DefaultCulture);

            SupportedCultures.ForEach(culture => {
                valid &= GenericHelper.IsGenericCulture(culture);
            });
            SupportedUiCultures?.ForEach(culture => {
                valid &= GenericHelper.IsGenericCulture(culture);
            });

            if (!valid)
            {
                throw new ValidationException("Invalid culture code in the config file");
            }
        }