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"); } }
public static IWebHost ValidateSetup(this IWebHost webHost) { Guard.NotNull(webHost, nameof(webHost)); var runtimeValidator = new RuntimeValidator(); runtimeValidator.Run(); return(webHost); }