Share via


HealthMonitoringSection.Enabled プロパティ

定義

状態監視が有効かどうかを示す値を取得または設定します。

public:
 property bool Enabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enabled", DefaultValue=true)]
public bool Enabled { get; set; }
[<System.Configuration.ConfigurationProperty("enabled", DefaultValue=true)>]
member this.Enabled : bool with get, set
Public Property Enabled As Boolean

プロパティ値

状態監視が有効な場合は true。それ以外の場合は false。 既定値は、true です。

属性

次のコード例は、 プロパティから現在の値を取得する方法と、このプロパティを Enabled の値 falseに設定して正常性監視を無効にする方法を示しています。 このコード例は、HealthMonitoringSection クラスのために提供されている大規模な例の一部です。


// Get the current Enabled property value.
Boolean enabledValue = healthMonitoringSection.Enabled;

// Set the Enabled property to false.
healthMonitoringSection.Enabled = false;

' Get the current Enabled property value.
Dim enabledValue As Boolean = healthMonitoringSection.Enabled

' Set the Enabled property to False.
healthMonitoringSection.Enabled = False

適用対象