private static void AddConfiguration(WebHostBuilderContext context, IConfigurationBuilder builder) { string env = GetEnvironmentVariableFromAllTargets("ASPNETCORE_ENVIRONMENT"); if (env.ToLower() == "production") { string configAddress = GetEnvironmentVariableFromAllTargets("Config_Address"); if (string.IsNullOrWhiteSpace(configAddress)) { throw new ApplicationException("O endereço do servidor de configurações não foi informado"); } builder.AddAzimuteLibConfigProvider(configAddress); } }