RuleSettings.MinInterval Property

Definition

Gets or sets the minimum time interval between two events of the same type.

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

Property Value

The minimum time interval between two events of the same type. The default value is 0 ticks.

Attributes

Examples

The following code example shows how to use the MinInterval property. This code example is part of a larger example provided for the HealthMonitoringSection class.

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

Remarks

The value can be made infinite by setting it to MaxValue. Invalid values may cause an exception to be thrown when the configuration section is saved.

If the value is zero, then there is no minimum interval.

Applies to

See also