Partage via


HealthMonitoringSection.HeartbeatInterval Propriété

Définition

Obtient ou définit l’intervalle utilisé par le domaine d’application lorsqu’il déclenche l’événement WebHeartbeatEvent .

public:
 property TimeSpan HeartbeatInterval { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))]
[System.Configuration.ConfigurationProperty("heartbeatInterval", DefaultValue="00:00:00")]
[System.Configuration.TimeSpanValidator(MaxValueString="24.20:31:23", MinValueString="00:00:00")]
public TimeSpan HeartbeatInterval { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))>]
[<System.Configuration.ConfigurationProperty("heartbeatInterval", DefaultValue="00:00:00")>]
[<System.Configuration.TimeSpanValidator(MaxValueString="24.20:31:23", MinValueString="00:00:00")>]
member this.HeartbeatInterval : TimeSpan with get, set
Public Property HeartbeatInterval As TimeSpan

Valeur de propriété

Intervalle utilisé par le domaine d’application lorsqu’il déclenche l’événement WebHeartbeatEvent .

Attributs

Exemples

L’exemple de code suivant montre comment utiliser la HeartbeatInterval propriété. Cet exemple de code fait partie d’un exemple plus grand fourni pour la HealthMonitoringSection classe.


// Get the current HeartBeatInterval property value.
TimeSpan heartBeatIntervalValue = healthMonitoringSection.HeartbeatInterval;

// Set the HeartBeatInterval property to
// TimeSpan.Parse("00:10:00").
healthMonitoringSection.HeartbeatInterval = TimeSpan.Parse("00:10:00");

' Get the current HeartBeatInterval property value.
Dim heartBeatIntervalValue As TimeSpan = healthMonitoringSection.HeartbeatInterval

' Set the HeartBeatInterval property to
' TimeSpan.Parse("00:10:00").
healthMonitoringSection.HeartbeatInterval = TimeSpan.Parse("00:10:00")

Remarques

Si la TimeSpan valeur est égale à zéro, aucun événement n’est WebHeartbeatEvent déclenché.

S’applique à