HostBuilderContext 类

定义

包含 IHost 上的公共服务的上下文。Context containing the common services on the IHost. 某些属性在由 IHost 设置之前可能为 null。Some properties may be null until set by the IHost.

public ref class HostBuilderContext
public class HostBuilderContext
type HostBuilderContext = class
Public Class HostBuilderContext
继承
HostBuilderContext

构造函数

HostBuilderContext(IDictionary<Object,Object>)

属性

Configuration

包含应用程序的合并配置和 IHostIConfigurationThe IConfiguration containing the merged configuration of the application and the IHost.

HostingEnvironment

IHost 初始化的 IHostEnvironmentThe IHostEnvironment initialized by the IHost.

Properties

用于在主机生成过程中共享组件间状态的中心位置。A central location for sharing state between components during the host building process.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于