NetNamedPipeBindingElement.MaxBufferPoolSize 属性

定义

获取或设置缓冲池的最大大小(以字节为单位)。

public:
 property long MaxBufferPoolSize { long get(); void set(long value); };
[System.Configuration.ConfigurationProperty("maxBufferPoolSize", DefaultValue=524288)]
[System.Configuration.LongValidator(MinValue=0)]
public long MaxBufferPoolSize { get; set; }
[<System.Configuration.ConfigurationProperty("maxBufferPoolSize", DefaultValue=524288)>]
[<System.Configuration.LongValidator(MinValue=0)>]
member this.MaxBufferPoolSize : int64 with get, set
Public Property MaxBufferPoolSize As Long

属性值

缓冲池的最大大小。 默认值为 524,288 字节(512 * 1024)。

属性

注解

Windows Communication Foundation(WCF)的许多部分都使用缓冲区。 每次使用缓冲区时创建和销毁缓冲区的成本高昂,缓冲区的垃圾回收也非常昂贵。 使用缓冲池,可以从池中获取缓冲区,使用它,并在完成后将其返回到池。 因此,可以避免创建和销毁缓冲区的开销。

适用于