3 writes to _lineBuffer
System.Net.ServerSentEvents (3)
System\Net\ServerSentEvents\SseParser_1.cs (3)
104_lineBuffer = ArrayPool<byte>.Shared.Rent(DefaultArrayPoolRentSize); 184_lineBuffer = ArrayPool<byte>.Shared.Rent(DefaultArrayPoolRentSize); 306GrowBuffer(ref _lineBuffer, _lineBuffer.Length * 2);
23 references to _lineBuffer
System.Net.ServerSentEvents (23)
System\Net\ServerSentEvents\SseParser_1.cs (23)
53/// <summary>The starting offset of valid data in <see cref="_lineBuffer"/>.</summary> 55/// <summary>The length of valid data in <see cref="_lineBuffer"/>, starting from <see cref="_lineOffset"/>.</summary> 57/// <summary>The index in <see cref="_lineBuffer"/> where a newline ('\r', '\n', or "\r\n") was found.</summary> 59/// <summary>The index in <see cref="_lineBuffer"/> of characters already checked for newlines.</summary> 121_newlineIndex = _lineBuffer.AsSpan(searchOffset, searchLength).IndexOfAny(CR, LF); 126if (_lineBuffer[_newlineIndex] is LF || // the newline is LF 164ArrayPool<byte>.Shared.Return(_lineBuffer); 201_newlineIndex = _lineBuffer.AsSpan(searchOffset, searchLength).IndexOfAny(CR, LF); 206if (_lineBuffer[_newlineIndex] is LF || // newline is LF 244ArrayPool<byte>.Shared.Return(_lineBuffer); 268Debug.Assert(searchOffset <= _lineBuffer.Length, $"{searchOffset}, {_lineBuffer.Length}"); 277return _lineBuffer.AsSpan(_newlineIndex, _lineLength - (_newlineIndex - _lineOffset)).StartsWith(CRLF) ? 2 : 1; 293if (_lineOffset + _lineLength == _lineBuffer.Length) 297_lineBuffer.AsSpan(_lineOffset, _lineLength).CopyTo(_lineBuffer); 304else if (_lineLength == _lineBuffer.Length) 306GrowBuffer(ref _lineBuffer, _lineBuffer.Length * 2); 317ReadOnlySpan<byte> line = _lineBuffer.AsSpan(_lineOffset, _newlineIndex - _lineOffset); 375ReadOnlySpan<byte> remainder = _lineBuffer.AsSpan(_newlineIndex + newlineLength, _lineLength - line.Length - newlineLength); 479_lineBuffer.AsSpan(offset)); 505_stream.ReadAsync(_lineBuffer.AsMemory(offset), cancellationToken) 532if (_lineBuffer.AsSpan(0, _lineLength).StartsWith(Utf8Bom))