Configuration.EvaluationContext 属性

定义

获取 Configuration 对象的 ContextInformation 对象。

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

属性值

ContextInformation 对象的 Configuration 对象。

示例

下面的代码示例演示如何使用 EvaluationContext 属性。

ContextInformation evalContext =
    config.EvaluationContext as ContextInformation;
Console.WriteLine("Machine level: {0}",
    evalContext.IsMachineLevel.ToString());
Dim evalContext As ContextInformation = TryCast(config.EvaluationContext, ContextInformation)
Console.WriteLine("Machine level: {0}", evalContext.IsMachineLevel.ToString())

注解

ContextInformation对象提供对象根据计算位置做出响应所需的Configuration上下文。

适用于

另请参阅