64 writes to _consumed
System.Text.Json (64)
System\Text\Json\Reader\Utf8JsonReader.cs (25)
235_consumed = 0; 747_consumed++; 781_consumed++; 810_consumed++; 875_consumed = prevConsumed; 967_consumed++; 977_consumed++; 993_consumed += numberOfBytes; 1011for (; _consumed < localBuffer.Length; _consumed++) 1146_consumed += literal.Length; 1213_consumed += consumed; 1273_consumed++; 1302_consumed += idx + 2; 1401_consumed += idx + 2; 1710_consumed = prevConsumed; 1757_consumed++; 1764_consumed--; 1894_consumed++; 1901_consumed--; 2016_consumed = prevConsumed; 2183_consumed = prevConsumed; 2226_consumed++; 2233_consumed--; 2398_consumed += 2 + toConsume; 2474_consumed += 4 + idx;
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (39)
46_consumed = 0; 184_consumed = prevConsumed; 330_consumed = 0; 342_consumed++; 352_consumed++; 365_consumed += numberOfBytes; 525_consumed = prevConsumed; 533_consumed += consumed; 679_consumed += consumed; 738_consumed++; 768_consumed += idx + 2; 821_consumed = idx + 1; // Add 1 for the end quote of the string. 933_consumed = idx + 1; // Add 1 for the end quote of the string. 1083_consumed = idx + 1; // Add 1 for the end quote of the string. 1092_consumed += idx + 2; 1112_consumed = state._prevConsumed; 1540_consumed = prevConsumed; 1589_consumed++; 1596_consumed--; 1604_consumed--; 1735_consumed++; 1742_consumed--; 1750_consumed--; 1867_consumed = prevConsumed; 2037_consumed = prevConsumed; 2082_consumed++; 2089_consumed--; 2097_consumed--; 2225_consumed = 0; 2233_consumed++; 2267_consumed++; 2329_consumed++; 2341_consumed += idx + 1; 2357_consumed++; 2368_consumed += localBuffer.Length; 2520_consumed++; 2532_consumed++; 2547_consumed += nextIdx; 2569_consumed += localBuffer.Length;
111 references to _consumed
System.Text.Json (111)
System\Text\Json\Reader\Utf8JsonReader.cs (60)
87return _totalConsumed + _consumed; 174return _sequence.GetPosition(_consumed, _currentPosition); 746ValueSpan = _buffer.Slice(_consumed, 1); 768ValueSpan = _buffer.Slice(_consumed, 1); 780ValueSpan = _buffer.Slice(_consumed, 1); 802ValueSpan = _buffer.Slice(_consumed, 1); 826byte first = _buffer[_consumed]; 839first = _buffer[_consumed]; 842TokenStartIndex = _consumed; 868int prevConsumed = _consumed; 919if (_consumed >= (uint)_buffer.Length) 949if (_consumed >= (uint)_buffer.Length) 966ValueSpan = _buffer.Slice(_consumed, 1); 976ValueSpan = _buffer.Slice(_consumed, 1); 988if (!TryGetNumber(localBuffer.Slice(_consumed), out int numberOfBytes)) 1011for (; _consumed < localBuffer.Length; _consumed++) 1013byte val = localBuffer[_consumed]; 1094if (_consumed >= (uint)_buffer.Length) 1103marker = _buffer[_consumed]; 1113marker = _buffer[_consumed]; 1116TokenStartIndex = _consumed; 1135ReadOnlySpan<byte> span = _buffer.Slice(_consumed); 1207if (!TryGetNumber(_buffer.Slice(_consumed), out int consumed)) 1216if (_consumed >= (uint)_buffer.Length) 1223ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); 1230((_consumed < _buffer.Length) && 1232JsonConstants.Delimiters.IndexOf(_buffer[_consumed]) >= 0) 1233|| (_isNotPrimitive ^ (_consumed >= (uint)_buffer.Length))); 1252byte first = _buffer[_consumed]; 1264first = _buffer[_consumed]; 1281Debug.Assert(_buffer.Length >= _consumed + 1); 1282Debug.Assert(_buffer[_consumed] == JsonConstants.Quote); 1285ReadOnlySpan<byte> localBuffer = _buffer.Slice(_consumed + 1); 1698int prevConsumed = _consumed; 1760if (_consumed >= (uint)_buffer.Length) 1770byte first = _buffer[_consumed]; 1781first = _buffer[_consumed]; 1784TokenStartIndex = _consumed; 1859byte first = _buffer[_consumed]; 1869first = _buffer[_consumed]; 1884TokenStartIndex = _consumed; 1897if (_consumed >= (uint)_buffer.Length) 1907first = _buffer[_consumed]; 1918first = _buffer[_consumed]; 1921TokenStartIndex = _consumed; 2010int prevConsumed = _consumed; 2094marker = _buffer[_consumed]; 2104marker = _buffer[_consumed]; 2130marker = _buffer[_consumed]; 2141marker = _buffer[_consumed]; 2162TokenStartIndex = _consumed; 2177int prevConsumed = _consumed; 2229if (_consumed >= (uint)_buffer.Length) 2239marker = _buffer[_consumed]; 2250marker = _buffer[_consumed]; 2258TokenStartIndex = _consumed; 2317ReadOnlySpan<byte> localBuffer = _buffer.Slice(_consumed + 1); 2494ReadOnlySpan<byte> localBuffer = _buffer.Slice(_consumed + 1); 2501return ConsumeSingleLineComment(localBuffer.Slice(1), _consumed); 2505return ConsumeMultiLineComment(localBuffer.Slice(1), _consumed);
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (51)
133byte first = _buffer[_consumed]; 146first = _buffer[_consumed]; 176int prevConsumed = _consumed; 252if (_consumed >= (uint)_buffer.Length) 280if (_consumed >= (uint)_buffer.Length) 329_totalConsumed += _consumed; 341ValueSpan = _buffer.Slice(_consumed, 1); 351ValueSpan = _buffer.Slice(_consumed, 1); 360if (!TryGetNumberMultiSegment(_buffer.Slice(_consumed), out int numberOfBytes)) 384if (_consumed < _buffer.Length) 461if (_consumed >= (uint)_buffer.Length) 478marker = _buffer[_consumed]; 489marker = _buffer[_consumed]; 512ReadOnlySpan<byte> span = _buffer.Slice(_consumed); 520int prevConsumed = _consumed; 570int startConsumed = _consumed; 673if (!TryGetNumberMultiSegment(_buffer.Slice(_consumed), out int consumed)) 681if (_consumed >= (uint)_buffer.Length) 688ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); 695((_consumed < _buffer.Length) && 697JsonConstants.Delimiters.IndexOf(_buffer[_consumed]) >= 0) 698|| (_isNotPrimitive ^ (_consumed >= (uint)_buffer.Length))); 717byte first = _buffer[_consumed]; 729first = _buffer[_consumed]; 746Debug.Assert(_buffer.Length >= _consumed + 1); 747Debug.Assert(_buffer[_consumed] == JsonConstants.Quote); 750ReadOnlySpan<byte> localBuffer = _buffer.Slice(_consumed + 1); 793int leftOver = _buffer.Length - _consumed; 963int leftOverFromConsumed = _buffer.Length - _consumed; 1527int prevConsumed = _consumed; 1592if (_consumed >= (uint)_buffer.Length) 1611byte first = _buffer[_consumed]; 1622first = _buffer[_consumed]; 1700byte first = _buffer[_consumed]; 1710first = _buffer[_consumed]; 1738if (_consumed >= (uint)_buffer.Length) 1757first = _buffer[_consumed]; 1768first = _buffer[_consumed]; 1861int prevConsumed = _consumed; 1946marker = _buffer[_consumed]; 1956marker = _buffer[_consumed]; 1982marker = _buffer[_consumed]; 1993marker = _buffer[_consumed]; 2030int prevConsumed = _consumed; 2085if (_consumed >= (uint)_buffer.Length) 2104marker = _buffer[_consumed]; 2115marker = _buffer[_consumed]; 2181SequencePosition start = new SequencePosition(_currentPosition.GetObject(), _currentPosition.GetInteger() + _consumed); 2192SequencePosition end = new SequencePosition(_currentPosition.GetObject(), _currentPosition.GetInteger() + _consumed); 2236ReadOnlySpan<byte> localBuffer = _buffer.Slice(_consumed); 2601return new PartialStateForRollback(_totalConsumed, _bytePositionInLine, _consumed, _currentPosition);