ConfigurationElement.EvaluationContext 属性

定义

获取 ConfigurationElement 对象的 ContextInformation 对象。

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

属性值

ContextInformation

ContextInformationConfigurationElement

例外

当前元素未关联上下文。

注解

对象 ContextInformation 提供对象根据评估位置做出决策所需的 ConfigurationElement 上下文。

ContextInformation 对象提供与配置元素相关的环境详细信息。 例如,可以使用IsMachineLevel该属性来确定是在Machine.config中设置的ConfigurationElement,还是可以使用该属性确定元素所属HostingContext的层次结构ConfigurationElement

适用于

另请参阅