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

◆ ReadMultiSegment()

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

Definition at line 2011 of file Utf8JsonReader.cs.

2012 {
2013 bool flag = false;
2014 HasValueSequence = false;
2015 ValueSpan = default(ReadOnlySpan<byte>);
2018 {
2019 byte b = _buffer[_consumed];
2020 if (b <= 32)
2021 {
2024 {
2025 goto IL_016c;
2026 }
2027 b = _buffer[_consumed];
2028 }
2030 if (_tokenType != 0)
2031 {
2032 if (b == 47)
2033 {
2035 }
2036 else if (_tokenType == JsonTokenType.StartObject)
2037 {
2038 if (b == 125)
2039 {
2040 EndObject();
2041 goto IL_016a;
2042 }
2043 if (b != 34)
2044 {
2045 ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, b);
2046 }
2048 int consumed = _consumed;
2050 long lineNumber = _lineNumber;
2051 SequencePosition currentPosition = _currentPosition;
2053 if (!flag)
2054 {
2056 _tokenType = JsonTokenType.StartObject;
2058 _lineNumber = lineNumber;
2061 }
2062 }
2063 else if (_tokenType != JsonTokenType.StartArray)
2064 {
2065 flag = ((_tokenType != JsonTokenType.PropertyName) ? ConsumeNextTokenOrRollbackMultiSegment(b) : ConsumeValueMultiSegment(b));
2066 }
2067 else
2068 {
2069 if (b == 93)
2070 {
2071 EndArray();
2072 goto IL_016a;
2073 }
2075 }
2076 }
2077 else
2078 {
2080 }
2081 }
2082 goto IL_016c;
2083 IL_016c:
2084 return flag;
2085 IL_016a:
2086 flag = true;
2087 goto IL_016c;
2088 }
bool ReadFirstTokenMultiSegment(byte first)
bool ConsumeValueMultiSegment(byte marker)
ReadOnlySequence< byte > ValueSequence
bool ConsumeNextTokenOrRollbackMultiSegment(byte marker)

References System.Text.Json.Utf8JsonReader._buffer, System.Text.Json.Utf8JsonReader._bytePositionInLine, System.Text.Json.Utf8JsonReader._consumed, System.Text.Json.Utf8JsonReader._currentPosition, System.Text.Json.Utf8JsonReader._lineNumber, System.Text.Json.Utf8JsonReader._tokenType, System.Text.Json.Utf8JsonReader._totalConsumed, System.Text.Json.Utf8JsonReader.BytesConsumed, System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollbackMultiSegment(), System.Text.Json.Utf8JsonReader.ConsumePropertyNameMultiSegment(), System.Text.Json.Utf8JsonReader.ConsumeValueMultiSegment(), System.Text.Json.Dictionary, System.Text.Json.Utf8JsonReader.EndArray(), System.Text.Json.Utf8JsonReader.EndObject(), System.Text.Json.Utf8JsonReader.HasMoreDataMultiSegment(), System.Text.Json.Utf8JsonReader.HasValueSequence, System.Text.Json.Utf8JsonReader.ReadFirstTokenMultiSegment(), System.Text.Json.Utf8JsonReader.SkipWhiteSpaceMultiSegment(), System.Text.Json.ThrowHelper.ThrowJsonReaderException(), System.Text.Json.Utf8JsonReader.TokenStartIndex, System.Text.Json.Utf8JsonReader.ValueSequence, and System.Text.Json.Utf8JsonReader.ValueSpan.

Referenced by System.Text.Json.Utf8JsonReader.Read().