共用方式為


BufferModeSettings.MaxBufferSize 屬性

定義

取得或設定一次可緩衝的最大事件數量。

public:
 property int MaxBufferSize { int get(); void set(int value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteIntConverter))]
[System.Configuration.ConfigurationProperty("maxBufferSize", DefaultValue=2147483647, IsRequired=true)]
[System.Configuration.IntegerValidator(MinValue=1)]
public int MaxBufferSize { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteIntConverter))>]
[<System.Configuration.ConfigurationProperty("maxBufferSize", DefaultValue=2147483647, IsRequired=true)>]
[<System.Configuration.IntegerValidator(MinValue=1)>]
member this.MaxBufferSize : int with get, set
Public Property MaxBufferSize As Integer

屬性值

一次可緩衝的最大事件數量。

屬性

範例

以下程式碼範例說明如何使用該 MaxBufferSize 屬性。 此程式碼範例是本類別更大範例 HealthMonitoringSection 的一部分。

bufferModeSetting.MaxBufferSize = 128;
bufferModeSetting.MaxBufferSize = 128

備註

此性質必須大於零。 若值無效,則在儲存設定區段時可能會拋出異常。

預設值會依提供者而異。 BufferModeSettings集合中的BufferModes物件由集合中的Providers提供者以名稱來稱呼。

適用於

另請參閱