RuleSettings.MaxLimit 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置引发同一类型的事件的最大次数。
public:
property int MaxLimit { int get(); void set(int value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteIntConverter))]
[System.Configuration.ConfigurationProperty("maxLimit", DefaultValue=2147483647)]
[System.Configuration.IntegerValidator(MinValue=0)]
public int MaxLimit { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteIntConverter))>]
[<System.Configuration.ConfigurationProperty("maxLimit", DefaultValue=2147483647)>]
[<System.Configuration.IntegerValidator(MinValue=0)>]
member this.MaxLimit : int with get, set
Public Property MaxLimit As Integer
属性值
引发同一类型的事件的最大次数。 默认值为 Int32.MaxValue。
- 属性
示例
下面的代码示例演示如何使用该 MaxLimit 属性。 该代码示例是 HealthMonitoringSection 类中的一个较大示例的一部分。
ruleSetting.MaxLimit = Int32.MaxValue;
ruleSetting.MaxLimit = Int32.MaxValue
注解
此属性的值必须大于零。 无效值可能会导致保存配置节时引发异常。
这表示将引发同一类型的事件的最大次数。 例如,如果值为 10,则事件将引发 10 次,之后将忽略该事件。