Slice() private method

private Slice ( int start, int end ) : JsonBuffer
start int
end int
return JsonBuffer
Exemplo n.º 1
0
        /// <summary>
        /// Buffers the value at which the reader is positioned.
        /// </summary>
        /// <returns>Returns a <see cref="JsonBuffer" /> object that holds
        /// the buffered value.</returns>

        public JsonBuffer BufferValue()
        {
            if (EOF)
            {
                return(JsonBuffer.Empty);
            }

            JsonTokenClass tokenClass = TokenClass;

            if (tokenClass.IsTerminator || tokenClass == JsonTokenClass.Member)
            {
                Read();
            }

            int start = _index;

            Skip();
            return(_buffer.Slice(start, _index));
        }