public static char[] RentBuffer(IJsonBufferPool<char> bufferPool, int minSize) { if (bufferPool == null) { return new char[minSize]; } return bufferPool.RentBuffer(minSize); }
public static char[] RentBuffer(IJsonBufferPool <char> bufferPool, int minSize) { if (bufferPool == null) { return(new char[minSize]); } char[] buffer = bufferPool.RentBuffer(minSize); return(buffer); }
public static void EnsureBufferSize(IJsonBufferPool <char> bufferPool, int size, ref char[] buffer) { if (bufferPool == null) { buffer = new char[size]; return; } if (buffer != null) { bufferPool.ReturnBuffer(ref buffer); } buffer = bufferPool.RentBuffer(size); }
public static void EnsureBufferSize(IJsonBufferPool<char> bufferPool, int size, ref char[] buffer) { if (bufferPool == null) { buffer = new char[size]; return; } if (buffer != null) { bufferPool.ReturnBuffer(ref buffer); } buffer = bufferPool.RentBuffer(size); }