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.

備註

物件會提供ConfigurationElement物件所需的內容,以根據其評估位置做出決策。 ContextInformationA 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.

適用於

另請參閱