AK.F1.Timing.Server.IO.ByteBuffer.EnsureCapacity C# (CSharp) Метод

EnsureCapacity() приватный Метод

private EnsureCapacity ( int count ) : void
count int
Результат void
        private void EnsureCapacity(int count)
        {
            checked
            {
                int requiredCapacity = _count + count;
                if(requiredCapacity > _buffer.Length)
                {
                    int newSize = _buffer.Length * 2;
                    while(newSize < requiredCapacity)
                    {
                        newSize *= 2;
                    }
                    ResizeBuffer(newSize);
                }
            }
        }