Exemple #1
0
 public void GetNextBuffer(int size, BufferSegment segment)
 {
     lock (this)
     {
         if (size > bufferPool.bufferSize)
         {
             bufferPool = new BufferPool(maxCommands, size);
         }
         bufferPool.GetNextBuffer(segment);
     }
 }
 public byte[] GetNextBuffer(int size)
 {
     lock (bufferPool)
     {
         if (size > bufferPool.bufferSize)
         {
             bufferPool = new BufferPool(maxCommands, size);
         }
         return(bufferPool.GetNextBuffer());
     }
 }