ContextInformation.IsMachineLevel 屬性

定義

取得值,可指定是否要在機器組態層上評估組態屬性。

public:
 property bool IsMachineLevel { bool get(); };
public bool IsMachineLevel { get; }
member this.IsMachineLevel : bool
Public ReadOnly Property IsMachineLevel As Boolean

屬性值

如果要在機器組態層上評估組態屬性,則為 true,否則為 false

範例

下列程式代碼範例示範如何使用 HostingContext 屬性。

// IsMachineLevel property.
Console.WriteLine("IsMachineLevel: {0}",
  config.EvaluationContext.IsMachineLevel);
' IsMachineLevel property.
Console.WriteLine("IsMachineLevel: {0}", _
  config.EvaluationContext.IsMachineLevel)

備註

當 傳回的 值為 IsMachineLevelfalse時,請使用 HostingContext 屬性來判斷組態階層內的層級。

適用於