Condividi tramite


HealthMonitoringSection.Enabled Proprietà

Definizione

Ottiene o imposta un valore che indica se il monitoraggio dello stato è attivato.

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

Valore della proprietà

Boolean

true se il monitoraggio dello stato è attivato; in caso contrario, false. Il valore predefinito è true.

Attributi

Esempio

Nell'esempio di codice seguente viene illustrato come ottenere il valore corrente dalla Enabled proprietà e come disabilitare il monitoraggio dell'integrità impostando questa proprietà su un valore di false. Questo esempio di codice fa parte di un esempio più grande fornito per la HealthMonitoringSection classe.


// 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

Si applica a