4 writes to _buffer
System.Text.Json (4)
System\Text\Json\Reader\Utf8JsonReader.cs (1)
215_buffer = jsonData;
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (3)
26_buffer = jsonData.First.Span; 80_buffer = memory.Span; 328_buffer = memory.Span;
105 references to _buffer
System.Text.Json (105)
System\Text\Json\Reader\Utf8JsonReader.cs (47)
53internal readonly ReadOnlySpan<byte> OriginalSpan => _sequence.IsEmpty ? _buffer : default; 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]; 919if (_consumed >= (uint)_buffer.Length) 949if (_consumed >= (uint)_buffer.Length) 966ValueSpan = _buffer.Slice(_consumed, 1); 976ValueSpan = _buffer.Slice(_consumed, 1); 984ReadOnlySpan<byte> localBuffer = _buffer; 1010ReadOnlySpan<byte> localBuffer = _buffer; 1094if (_consumed >= (uint)_buffer.Length) 1103marker = _buffer[_consumed]; 1113marker = _buffer[_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); 1760if (_consumed >= (uint)_buffer.Length) 1770byte first = _buffer[_consumed]; 1781first = _buffer[_consumed]; 1859byte first = _buffer[_consumed]; 1869first = _buffer[_consumed]; 1897if (_consumed >= (uint)_buffer.Length) 1907first = _buffer[_consumed]; 1918first = _buffer[_consumed]; 2094marker = _buffer[_consumed]; 2104marker = _buffer[_consumed]; 2130marker = _buffer[_consumed]; 2141marker = _buffer[_consumed]; 2229if (_consumed >= (uint)_buffer.Length) 2239marker = _buffer[_consumed]; 2250marker = _buffer[_consumed]; 2317ReadOnlySpan<byte> localBuffer = _buffer.Slice(_consumed + 1); 2494ReadOnlySpan<byte> localBuffer = _buffer.Slice(_consumed + 1); 2529ValueSpan = _buffer.Slice(previousConsumed + 2, idx); 2547ValueSpan = _buffer.Slice(previousConsumed + 2, idx);
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (58)
68bool firstSegmentIsEmpty = _buffer.Length == 0; 133byte first = _buffer[_consumed]; 146first = _buffer[_consumed]; 252if (_consumed >= (uint)_buffer.Length) 280if (_consumed >= (uint)_buffer.Length) 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); 592span = _buffer; 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; 810ReadOnlySpan<byte> localBuffer = _buffer; 900localBuffer = _buffer; 927localBuffer = _buffer; 963int leftOverFromConsumed = _buffer.Length - _consumed; 1041data = _buffer; 1074data = _buffer; 1279data = _buffer; 1329data = _buffer; 1389data = _buffer; 1447data = _buffer; 1482data = _buffer; 1510data = _buffer; 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]; 1946marker = _buffer[_consumed]; 1956marker = _buffer[_consumed]; 1982marker = _buffer[_consumed]; 1993marker = _buffer[_consumed]; 2085if (_consumed >= (uint)_buffer.Length) 2104marker = _buffer[_consumed]; 2115marker = _buffer[_consumed]; 2236ReadOnlySpan<byte> localBuffer = _buffer.Slice(_consumed); 2256localBuffer = _buffer; 2302localBuffer = _buffer; 2399localBuffer = _buffer; 2593localBuffer = _buffer;