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提供程序按名称引用。

适用于

另请参阅