public StreamFormatter(Stream stream, FormattingData formattingData, ManagedBufferPool<byte> pool, int bufferSize = 256) { _pool = pool; _buffer = null; if (bufferSize > 0) { _buffer = _pool.RentBuffer(bufferSize); } _formattingData = formattingData; _stream = stream; }
public StringFormatter(int capacity, ManagedBufferPool<byte> pool) { _pool = pool; _buffer = _pool.RentBuffer(capacity * 2); }