private IBuffer GetWriteBuffer() { IBuffer result; if (mWriteLastBuffer == null) { result = mPool.Pop(); mWriteFirstBuffer = result; mWriteLastBuffer = result; } else { if (mWriteLastBuffer.Eof) { result = mPool.Pop(); mWriteLastBuffer.Next = result; mWriteLastBuffer = result; } else { result = mWriteLastBuffer; } } return(result); }