Lines Matching refs:token

47     /// between values. It validates the token stream as it goes - so callers can assume that the
50 /// <para>Implementation details: the base class handles single token push-back and </para>
82 // TODO: Why do we allow a different token to be pushed back? It might be better to always remember the previous
83 // token returned, and allow a parameterless Rewind() method (which could only be called once, just like the current PushBack).
84 internal void PushBack(JsonToken token)
90 bufferedToken = token;
91 if (token.Type == JsonToken.TokenType.StartObject)
95 else if (token.Type == JsonToken.TokenType.EndObject)
102 /// Returns the next JSON token in the stream. An EndDocument token is returned to indicate the end of the stream,
105 /// <remarks>This implementation provides single-token buffering, and calls <see cref="NextImpl"/> if there is no buffered token.</remarks>
106 /// <returns>The next token in the stream. This is never null.</returns>
107 /// <exception cref="InvalidOperationException">This method is called after an EndDocument token has been returned</exception>
133 /// Returns the next JSON token in the stream, when requested by the base class. (The <see cref="Next"/> method delegates
134 /// to this if it doesn't have a buffered token.)
136 /// <exception cref="InvalidOperationException">This method is called after an EndDocument token has been returned</exception>
150 // do/while rather than while loop so that we read at least one token.
153 var token = Next();
154 switch (token.Type)
199 // The set of states in which a value is valid next token.
216 /// until it reaches something which will be a genuine token (e.g. a start object, or a value) at which point
217 /// it returns the token. Although the method is large, it would be relatively hard to break down further... most
305 ValidateAndModifyStateForValue("Invalid state to read a number token: ");
308 throw new InvalidJsonException("Invalid first character of token: " + next.Value);
322 /// Reads a string token. It is assumed that the opening " has already been read.
432 throw reader.CreateException("Unexpected end of text while reading literal token " + text);
436 throw reader.CreateException("Unexpected character while reading literal token " + text);
465 // to parse the next token.