ConfigurationElement.EvaluationContext ConfigurationElement.EvaluationContext ConfigurationElement.EvaluationContext ConfigurationElement.EvaluationContext Property

定义

获取 ConfigurationElement 对象的 ContextInformation 对象。Gets the ContextInformation object for the ConfigurationElement object.

protected:
 property System::Configuration::ContextInformation ^ EvaluationContext { System::Configuration::ContextInformation ^ get(); };
protected System.Configuration.ContextInformation EvaluationContext { get; }
member this.EvaluationContext : System.Configuration.ContextInformation
Protected ReadOnly Property EvaluationContext As ContextInformation

属性值

异常

当前元素未关联上下文。The current element is not associated with a context.

注解

一个ContextInformation对象提供所需的上下文ConfigurationElement对象,从而使决策基于计算位置。A ContextInformation object provides the context necessary for a ConfigurationElement object to make decisions based upon where it is being evaluated.

ContextInformation对象提供了相关的配置元素的环境详细信息。The ContextInformation object provides environment details related to an element of the configuration. 例如,可以使用IsMachineLevel属性来确定是否ConfigurationElement已在 Machine.config 中设置或可以确定哪些层次结构ConfigurationElement元素使用属于HostingContext属性。For example, you can use the IsMachineLevel property to determine whether a ConfigurationElement was set in Machine.config, or you can determine which hierarchy a ConfigurationElement element belongs to by using the HostingContext property.

适用于

另请参阅