Constructor NatsBufferWriter
NatsBufferWriter()
Initializes a new instance of the NatsBufferWriter<T> class.
public NatsBufferWriter()
NatsBufferWriter(ArrayPool<T>)
Initializes a new instance of the NatsBufferWriter<T> class.
public NatsBufferWriter(ArrayPool<T> pool)
Parameters
pool
ArrayPool<T>The ArrayPool<T> instance to use.
NatsBufferWriter(int)
Initializes a new instance of the NatsBufferWriter<T> class.
public NatsBufferWriter(int initialCapacity)
Parameters
initialCapacity
intThe minimum capacity with which to initialize the underlying buffer.
Exceptions
- ArgumentOutOfRangeException
Thrown when
initialCapacity
is not valid.
NatsBufferWriter(ArrayPool<T>, int)
Initializes a new instance of the NatsBufferWriter<T> class.
public NatsBufferWriter(ArrayPool<T> pool, int initialCapacity)
Parameters
pool
ArrayPool<T>The ArrayPool<T> instance to use.
initialCapacity
intThe minimum capacity with which to initialize the underlying buffer.
Exceptions
- ArgumentOutOfRangeException
Thrown when
initialCapacity
is not valid.