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

◆ Utf8JsonReader() [3/4]

System.Text.Json.Utf8JsonReader.Utf8JsonReader ( ReadOnlySequence< byte > jsonData,
bool isFinalBlock,
JsonReaderState state )
inline

Definition at line 1949 of file Utf8JsonReader.cs.

1950 {
1951 ReadOnlyMemory<byte> memory = jsonData.First;
1952 _buffer = memory.Span;
1954 _isInputSequence = true;
1955 _lineNumber = state._lineNumber;
1956 _bytePositionInLine = state._bytePositionInLine;
1957 _inObject = state._inObject;
1958 _isNotPrimitive = state._isNotPrimitive;
1959 _stringHasEscaping = state._stringHasEscaping;
1960 _trailingCommaBeforeComment = state._trailingCommaBeforeComment;
1961 _tokenType = state._tokenType;
1962 _previousTokenType = state._previousTokenType;
1963 _readerOptions = state._readerOptions;
1964 if (_readerOptions.MaxDepth == 0)
1965 {
1967 }
1968 _bitStack = state._bitStack;
1969 _consumed = 0;
1970 TokenStartIndex = 0L;
1971 _totalConsumed = 0L;
1972 ValueSpan = ReadOnlySpan<byte>.Empty;
1974 HasValueSequence = false;
1976 if (jsonData.IsSingleSegment)
1977 {
1978 _nextPosition = default(SequencePosition);
1979 _currentPosition = jsonData.Start;
1981 _isMultiSegment = false;
1982 return;
1983 }
1984 _currentPosition = jsonData.Start;
1986 bool flag = _buffer.Length == 0;
1987 if (flag)
1988 {
1989 SequencePosition nextPosition = _nextPosition;
1990 ReadOnlyMemory<byte> memory2;
1991 while (jsonData.TryGet(ref _nextPosition, out memory2))
1992 {
1994 if (memory2.Length != 0)
1995 {
1996 _buffer = memory2.Span;
1997 break;
1998 }
2000 }
2001 }
2003 _isMultiSegment = true;
2004 }
static readonly ReadOnlySequence< T > Empty
static ReadOnlySpan< T > Empty
readonly ReadOnlySequence< byte > _sequence
ReadOnlySequence< byte > ValueSequence

References System.Text.Json.Utf8JsonReader._bitStack, System.Text.Json.Utf8JsonReader._buffer, System.Text.Json.Utf8JsonReader._bytePositionInLine, System.Text.Json.Utf8JsonReader._consumed, System.Text.Json.Utf8JsonReader._currentPosition, System.Text.Json.Utf8JsonReader._inObject, System.Text.Json.Utf8JsonReader._isFinalBlock, System.Text.Json.Utf8JsonReader._isInputSequence, System.Text.Json.Utf8JsonReader._isLastSegment, System.Text.Json.Utf8JsonReader._isMultiSegment, System.Text.Json.Utf8JsonReader._isNotPrimitive, System.Text.Json.Utf8JsonReader._lineNumber, System.Text.Json.Utf8JsonReader._nextPosition, System.Text.Json.Utf8JsonReader._previousTokenType, System.Text.Json.Utf8JsonReader._readerOptions, System.Text.Json.Utf8JsonReader._sequence, System.Text.Json.Utf8JsonReader._stringHasEscaping, System.Text.Json.Utf8JsonReader._tokenType, System.Text.Json.Utf8JsonReader._totalConsumed, System.Text.Json.Utf8JsonReader._trailingCommaBeforeComment, System.Text.Json.Dictionary, System.Buffers.ReadOnlySequence< T >.Empty, System.ReadOnlySpan< T >.Empty, System.Text.Json.Utf8JsonReader.HasValueSequence, System.L, System.Text.Json.JsonReaderOptions.MaxDepth, System.state, System.Text.Json.Utf8JsonReader.TokenStartIndex, System.Text.Json.Utf8JsonReader.ValueSequence, and System.Text.Json.Utf8JsonReader.ValueSpan.