29 references to ParsingError
Microsoft.Analyzers.Local (19)
ApiLifecycle\Json\JsonParseException.cs (8)
30public ParsingError Error { get; } 36: base(GetMessage(ParsingError.Unknown)) 45public JsonParseException(ParsingError type, TextPosition position) 56public JsonParseException(string message, ParsingError error, TextPosition position) 63private static string GetMessage(ParsingError type) 67ParsingError.IncompleteMessage => "The string ended before a value could be parsed.", 68ParsingError.InvalidOrUnexpectedCharacter => "The parser encountered an invalid or unexpected character.", 69ParsingError.DuplicateObjectKeys => "The parser encountered a JsonObject with duplicate keys.",
ApiLifecycle\Json\JsonReader.cs (7)
82ParsingError.InvalidOrUnexpectedCharacter, 194ParsingError.InvalidOrUnexpectedCharacter, 207ParsingError.InvalidOrUnexpectedCharacter, 241ParsingError.InvalidOrUnexpectedCharacter, 285ParsingError.DuplicateObjectKeys, 320ParsingError.InvalidOrUnexpectedCharacter, 375ParsingError.InvalidOrUnexpectedCharacter,
ApiLifecycle\Json\TextScanner.cs (4)
52throw new JsonParseException(ParsingError.IncompleteMessage, Position); 68throw new JsonParseException(ParsingError.IncompleteMessage, Position); 117ParsingError.InvalidOrUnexpectedCharacter, 153ParsingError.InvalidOrUnexpectedCharacter,
Microsoft.Analyzers.Local.Tests (10)
Json\JsonParseExceptionTest.cs (1)
17Assert.Equal(ParsingError.Unknown, ex.Error);
Json\JsonReaderTest.cs (4)
71Assert.Equal(ParsingError.InvalidOrUnexpectedCharacter, ex.Error); 76Assert.Equal(ParsingError.InvalidOrUnexpectedCharacter, ex.Error); 81Assert.Equal(ParsingError.InvalidOrUnexpectedCharacter, ex.Error); 90Assert.Equal(ParsingError.InvalidOrUnexpectedCharacter, ex.Error);
Json\JsonScannerTest.cs (5)
19Assert.Equal(ParsingError.InvalidOrUnexpectedCharacter, ex.Error); 24Assert.Equal(ParsingError.IncompleteMessage, ex.Error); 34Assert.Equal(ParsingError.InvalidOrUnexpectedCharacter, ex.Error); 41Assert.Equal(ParsingError.IncompleteMessage, ex.Error); 45Assert.Equal(ParsingError.IncompleteMessage, ex.Error);