Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ConsumeComment()

bool System.Text.Json.Utf8JsonReader.ConsumeComment ( )
inlineprivate

Definition at line 1876 of file Utf8JsonReader.cs.

1877 {
1878 ReadOnlySpan<byte> readOnlySpan = _buffer.Slice(_consumed + 1);
1879 if (readOnlySpan.Length > 0)
1880 {
1881 byte b = readOnlySpan[0];
1882 switch (b)
1883 {
1884 case 47:
1886 case 42:
1888 }
1889 ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAtStartOfComment, b);
1890 }
1891 if (IsLastSpan)
1892 {
1893 ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment, 0);
1894 }
1895 return false;
1896 }
ReadOnlySpan< T > Slice(int start)
bool ConsumeSingleLineComment(ReadOnlySpan< byte > localBuffer, int previousConsumed)
bool ConsumeMultiLineComment(ReadOnlySpan< byte > localBuffer, int previousConsumed)

References System.Text.Json.Utf8JsonReader._buffer, System.Text.Json.Utf8JsonReader._consumed, System.Text.Json.Utf8JsonReader.ConsumeMultiLineComment(), System.Text.Json.Utf8JsonReader.ConsumeSingleLineComment(), System.Text.Json.Dictionary, System.Text.Json.Utf8JsonReader.IsLastSpan, System.ReadOnlySpan< T >.Slice(), and System.Text.Json.ThrowHelper.ThrowJsonReaderException().

Referenced by System.Text.Json.Utf8JsonReader.ConsumeNextToken(), System.Text.Json.Utf8JsonReader.ConsumeNextTokenFromLastNonCommentToken(), and System.Text.Json.Utf8JsonReader.ConsumeValue().