Ejemplo n.º 1
0
        private void ValidateConfiguration()
        {
            var validationOutcomes = RuntimeValidator.Run(Configuration);

            if (validationOutcomes.Any(validationOutcome => validationOutcome.Successful == false))
            {
                throw new Exception("Unable to start up due to invalid configuration");
            }
        }
Ejemplo n.º 2
0
        public static IWebHost ValidateSetup(this IWebHost webHost)
        {
            Guard.NotNull(webHost, nameof(webHost));

            var runtimeValidator = new RuntimeValidator();

            runtimeValidator.Run();

            return(webHost);
        }