Share via


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 提供者參考。

適用於

另請參閱