RuleSettings.MinInterval 属性

定义

获取或设置同一类型的两个事件之间的最小时间间隔。

public:
 property TimeSpan MinInterval { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))]
[System.Configuration.ConfigurationProperty("minInterval", DefaultValue="00:00:00")]
public TimeSpan MinInterval { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))>]
[<System.Configuration.ConfigurationProperty("minInterval", DefaultValue="00:00:00")>]
member this.MinInterval : TimeSpan with get, set
Public Property MinInterval As TimeSpan

属性值

同一类型的两个事件之间的最小时间间隔。 默认值为 0 刻度。

属性

示例

下面的代码示例演示如何使用该 MinInterval 属性。 该代码示例是 HealthMonitoringSection 类中的一个较大示例的一部分。

ruleSetting.MinInterval = TimeSpan.Parse("00:00:30");
ruleSetting.MinInterval = TimeSpan.Parse("00:00:30")

注解

通过将该值设置为 可以无限。 无效值可能会导致保存配置节时引发异常。

如果值为零,则没有最小间隔。

适用于

另请参阅