共用方式為


RuleSettings.MaxLimit 屬性

定義

取得或設定同類型事件被提出的最大次數。

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 次,之後忽略。

適用於

另請參閱