RuleSettings.MinInterval 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定兩個相同類型事件之間的最小時間區間。
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 tick。
- 屬性
範例
以下程式碼範例說明如何使用該 MinInterval 屬性。 此程式碼範例是本類別更大範例 HealthMonitoringSection 的一部分。
ruleSetting.MinInterval = TimeSpan.Parse("00:00:30");
ruleSetting.MinInterval = TimeSpan.Parse("00:00:30")
備註
可透過將 設定為 MaxValue,使值無限大。 若值無效,則在儲存設定區段時可能會拋出異常。
若值為零,則不存在最小區間。