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

适用于

另请参阅