IHostApplicationBuilder 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示可帮助管理配置、日志记录和生存期的托管应用程序和服务生成器。
public interface class IHostApplicationBuilder
public interface IHostApplicationBuilder
type IHostApplicationBuilder = interface
Public Interface IHostApplicationBuilder
- 派生
属性
| Configuration |
获取键/值配置属性集。 |
| Environment |
获取有关运行应用程序的托管环境的信息。 |
| Logging |
获取要撰写的应用程序的日志记录提供程序的集合。 这对于添加新的日志记录提供程序很有用。 |
| Metrics |
允许启用指标并定向其输出。 |
| Properties |
获取一个中心位置,用于在主机生成过程中在组件之间共享状态。 |
| Services |
获取要撰写的应用程序的服务集合。 这对于添加用户提供或框架提供的服务非常有用。 |
方法
| ConfigureContainer<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder>, Action<TContainerBuilder>) |
IServiceProviderFactory<TContainerBuilder>注册要用于创建 的IServiceProvider实例。 |