Class MemoryStreamWriterPool
- Namespace
- AsmResolver.IO
- Assembly
- AsmResolver.dll
Provides a pool of reusable instances of BinaryStreamWriter that are meant to be used for constructing byte arrays.
public class MemoryStreamWriterPool
- Inheritance
-
MemoryStreamWriterPool
- Inherited Members
Remarks
This class is thread-safe. All threads are allowed to rent and return writers from this pool simultaneously.
Methods
Rent()
Rents a single binary stream writer.
public MemoryStreamWriterPool.RentedWriter Rent()
Returns
- MemoryStreamWriterPool.RentedWriter
The writer.
Rent(int)
Rents a single binary stream writer.
public MemoryStreamWriterPool.RentedWriter Rent(int minimumCapacity)
Parameters
minimumCapacityintThe minimum capacity of the backing stream.
Returns
- MemoryStreamWriterPool.RentedWriter
The writer.