Npgsql.WriteBuffer.WriteStringChunked C# (CSharp) Method

WriteStringChunked() private method

private WriteStringChunked ( char chars, int charIndex, int charCount, bool flush, int &charsUsed, bool &completed ) : void
chars char
charIndex int
charCount int
flush bool
charsUsed int
completed bool
return void
        internal void WriteStringChunked(char[] chars, int charIndex, int charCount,
                                         bool flush, out int charsUsed, out bool completed)
        {
            if (WriteSpaceLeft == 0)
            {
                charsUsed = 0;
                completed = false;
                return;
            }

            int bytesUsed;
            _textEncoder.Convert(chars, charIndex, charCount, _buf, WritePosition, WriteSpaceLeft,
                                 flush, out charsUsed, out bytesUsed, out completed);
            WritePosition += bytesUsed;
        }