HealthMonitoringSection.HeartbeatInterval 属性

定义

获取或设置引发 WebHeartbeatEvent 事件时应用程序域使用的间隔。Gets or sets the interval used by the application domain when it raises the WebHeartbeatEvent event.

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

属性值

TimeSpan

引发 WebHeartbeatEvent 事件时应用程序域使用的间隔。The interval used by the application domain when it raises the WebHeartbeatEvent event.

属性

示例

下面的代码示例说明如何使用 HeartbeatInterval 属性。The following code example shows how to use the HeartbeatInterval property. 此代码示例是为类提供的更大示例的一部分 HealthMonitoringSectionThis code example is part of a larger example provided for the HealthMonitoringSection class.


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

注解

如果 TimeSpan 该值为零刻度,则不 WebHeartbeatEvent 引发任何事件。If the TimeSpan value is zero ticks, no WebHeartbeatEvent event is raised.

适用于