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)
122
if (
_newlineIndex
>= 0)
126
if (_lineBuffer[
_newlineIndex
] is LF || // the newline is LF
127
_newlineIndex
- _lineOffset + 1 < _lineLength || // we must have CR and we have whatever comes after it
202
if (
_newlineIndex
>= 0)
206
if (_lineBuffer[
_newlineIndex
] is LF || // newline is LF
207
_newlineIndex
- _lineOffset + 1 < _lineLength || // newline is CR, and we have whatever comes after it
276
Debug.Assert(
_newlineIndex
- _lineOffset < _lineLength, "Expected to be positioned at a non-empty newline");
277
return _lineBuffer.AsSpan(
_newlineIndex
, _lineLength - (
_newlineIndex
- _lineOffset)).StartsWith(CRLF) ? 2 : 1;
317
ReadOnlySpan<byte> line = _lineBuffer.AsSpan(_lineOffset,
_newlineIndex
- _lineOffset);
375
ReadOnlySpan<byte> remainder = _lineBuffer.AsSpan(
_newlineIndex
+ newlineLength, _lineLength - line.Length - newlineLength);