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
255
if (_lastSearchedForNewline >
_lineOffset
)
258
searchLength = _lineLength - (_lastSearchedForNewline -
_lineOffset
);
262
searchOffset =
_lineOffset
;
266
Debug.Assert(searchOffset >=
_lineOffset
, $"{searchOffset}, {_lineLength}");
267
Debug.Assert(searchOffset <=
_lineOffset
+ _lineLength, $"{searchOffset}, {
_lineOffset
}, {_lineLength}");
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;
293
if (
_lineOffset
+ _lineLength == _lineBuffer.Length)
295
if (
_lineOffset
!= 0)
297
_lineBuffer.AsSpan(
_lineOffset
, _lineLength).CopyTo(_lineBuffer);
300
_lastSearchedForNewline -=
_lineOffset
;
317
ReadOnlySpan<byte> line = _lineBuffer.AsSpan(
_lineOffset
, _newlineIndex -
_lineOffset
);
476
int offset =
_lineOffset
+ _lineLength;
502
int offset =
_lineOffset
+ _lineLength;
530
Debug.Assert(
_lineOffset
== 0, $"Expected _lineOffset == 0, got {
_lineOffset
}");