4 writes to _lineOffset
System.Net.ServerSentEvents (4)
System\Net\ServerSentEvents\SseParser_1.cs (4)
137_lineOffset += advance; 217_lineOffset += advance; 302_lineOffset = 0; 534_lineOffset += 3;
22 references to _lineOffset
System.Net.ServerSentEvents (22)
System\Net\ServerSentEvents\SseParser_1.cs (22)
55/// <summary>The length of valid data in <see cref="_lineBuffer"/>, starting from <see cref="_lineOffset"/>.</summary> 127_newlineIndex - _lineOffset + 1 < _lineLength || // we must have CR and we have whatever comes after it 147_lastSearchedForNewline = _lineOffset + _lineLength; 207_newlineIndex - _lineOffset + 1 < _lineLength || // newline is CR, and we have whatever comes after it 255if (_lastSearchedForNewline > _lineOffset) 258searchLength = _lineLength - (_lastSearchedForNewline - _lineOffset); 262searchOffset = _lineOffset; 266Debug.Assert(searchOffset >= _lineOffset, $"{searchOffset}, {_lineLength}"); 267Debug.Assert(searchOffset <= _lineOffset + _lineLength, $"{searchOffset}, {_lineOffset}, {_lineLength}"); 276Debug.Assert(_newlineIndex - _lineOffset < _lineLength, "Expected to be positioned at a non-empty newline"); 277return _lineBuffer.AsSpan(_newlineIndex, _lineLength - (_newlineIndex - _lineOffset)).StartsWith(CRLF) ? 2 : 1; 293if (_lineOffset + _lineLength == _lineBuffer.Length) 295if (_lineOffset != 0) 297_lineBuffer.AsSpan(_lineOffset, _lineLength).CopyTo(_lineBuffer); 300_lastSearchedForNewline -= _lineOffset; 317ReadOnlySpan<byte> line = _lineBuffer.AsSpan(_lineOffset, _newlineIndex - _lineOffset); 476int offset = _lineOffset + _lineLength; 502int offset = _lineOffset + _lineLength; 530Debug.Assert(_lineOffset == 0, $"Expected _lineOffset == 0, got {_lineOffset}");