Lines Matching refs:reader

58         ///  Creates a tokenizer that reads from the given text reader.
60 internal static JsonTokenizer FromTextReader(TextReader reader)
62 return new JsonTextTokenizer(reader);
203 private readonly PushBackReader reader;
206 internal JsonTextTokenizer(TextReader reader)
208 this.reader = new PushBackReader(reader);
228 var next = reader.Read();
317 throw reader.CreateException(errorPrefix + state);
330 char c = reader.ReadOrFail("Unexpected end of text while reading string");
333 throw reader.CreateException(string.Format(CultureInfo.InvariantCulture, "Invalid character in string literal: U+{0:x4}", (int) c));
339 throw reader.CreateException("Invalid use of surrogate pair code units");
352 throw reader.CreateException("Invalid use of surrogate pair code units");
364 char c = reader.ReadOrFail("Unexpected end of text while reading character escape sequence");
386 throw reader.CreateException(string.Format(CultureInfo.InvariantCulture, "Invalid character in character escape sequence: U+{0:x4}", (int) c));
398 char c = reader.ReadOrFail("Unexpected end of text while reading Unicode escape sequence");
414 throw reader.CreateException(string.Format(CultureInfo.InvariantCulture, "Invalid character in character escape sequence: U+{0:x4}", (int) c));
429 char? next = reader.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);
450 reader.PushBack(initialCharacter);
468 reader.PushBack(next.Value);
480 throw reader.CreateException("Numeric value out of range: " + builder);
486 char first = reader.ReadOrFail("Invalid numeric literal");
489 throw reader.CreateException("Invalid numeric literal");
496 throw reader.CreateException("Invalid numeric literal: leading 0 for non-zero value.");
508 throw reader.CreateException("Invalid numeric literal: fraction with no trailing digits");
516 char? next = reader.Read();
519 throw reader.CreateException("Invalid numeric literal: exponent with no trailing digits");
527 reader.PushBack(next.Value);
533 throw reader.CreateException("Invalid numeric literal: exponent without value");
543 char? next = reader.Read();
638 /// { "foo": "bar" } ^ (and already read to the end of the reader)
701 /// Wrapper around a text reader allowing small amounts of buffering and location handling.
707 private readonly TextReader reader;
709 internal PushBackReader(TextReader reader)
711 // TODO: Wrap the reader in a BufferedReader?
712 this.reader = reader;
732 int next = reader.Read();
756 /// Creates a new exception appropriate for the current state of the reader.