BufferManager.CreateBufferManager(Int64, Int32) 方法

定义

使用指定的最大缓冲池大小和缓冲池中每个单独缓冲区的最大大小创建新的 BufferManager。Creates a new BufferManager with a specified maximum buffer pool size and a maximum size for each individual buffer in the pool.

public:
 static System::ServiceModel::Channels::BufferManager ^ CreateBufferManager(long maxBufferPoolSize, int maxBufferSize);
public static System.ServiceModel.Channels.BufferManager CreateBufferManager (long maxBufferPoolSize, int maxBufferSize);
static member CreateBufferManager : int64 * int -> System.ServiceModel.Channels.BufferManager
Public Shared Function CreateBufferManager (maxBufferPoolSize As Long, maxBufferSize As Integer) As BufferManager

参数

maxBufferPoolSize
Int64

缓冲池的最大大小。The maximum size of the pool.

maxBufferSize
Int32

单独缓冲区的最大大小。The maximum size of an individual buffer.

返回

BufferManager

返回一个带有指定参数的 BufferManager 对象。Returns a BufferManager object with the specified parameters.

例外

没有足够的内存来创建请求的缓冲池。There was insufficient memory to create the requested buffer pool.

maxBufferPoolSizemaxBufferSize 小于零。maxBufferPoolSize or maxBufferSize was less than zero.

注解

此方法会创建新的缓冲池,其中包含所能创建的最多数量的缓冲区。This method creates a new buffer pool with as many buffers as can be created.

适用于