4 writes to _newlineIndex
System.Net.ServerSentEvents (4)
System\Net\ServerSentEvents\SseParser_1.cs (4)
121_newlineIndex = _lineBuffer.AsSpan(searchOffset, searchLength).IndexOfAny(CR, LF); 125_newlineIndex += searchOffset; 201_newlineIndex = _lineBuffer.AsSpan(searchOffset, searchLength).IndexOfAny(CR, LF); 205_newlineIndex += searchOffset;
11 references to _newlineIndex
System.Net.ServerSentEvents (11)
System\Net\ServerSentEvents\SseParser_1.cs (11)
122if (_newlineIndex >= 0) 126if (_lineBuffer[_newlineIndex] is LF || // the newline is LF 127_newlineIndex - _lineOffset + 1 < _lineLength || // we must have CR and we have whatever comes after it 202if (_newlineIndex >= 0) 206if (_lineBuffer[_newlineIndex] is LF || // newline is LF 207_newlineIndex - _lineOffset + 1 < _lineLength || // newline is CR, and we have whatever comes after it 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; 317ReadOnlySpan<byte> line = _lineBuffer.AsSpan(_lineOffset, _newlineIndex - _lineOffset); 375ReadOnlySpan<byte> remainder = _lineBuffer.AsSpan(_newlineIndex + newlineLength, _lineLength - line.Length - newlineLength);