Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public StringFormatter(int capacity, ManagedBufferPool<byte> pool)
 {
     _pool = pool;
     _buffer = _pool.RentBuffer(capacity * 2);
 }