HostApplicationBuilderSettings.DisableDefaults 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示实例是否 HostApplicationBuilder 配置了预配置的默认值。
public:
property bool DisableDefaults { bool get(); void set(bool value); };
public bool DisableDefaults { get; set; }
member this.DisableDefaults : bool with get, set
Public Property DisableDefaults As Boolean
属性值
注解
以下默认值应用于 : * ContentRootPath 将 *从“DOTNET_”前缀环境变量 * 加载IConfigurationIConfiguration的结果GetCurrentDirectory()设置为 “appsettings.json” 和 'appsettings.[EnvironmentName].json' * 从用户机密加载时EnvironmentName,使用输入程序集 * IConfiguration 从环境变量IConfiguration加载 * 从提供的命令行参数加载 IConfiguration * 配置ILoggerFactoryIHostBuilder若要记录到控制台、调试和事件源输出 * ,则当“开发”时EnvironmentName,可以对依赖项注入容器启用范围验证