1 write to _dataBuffer
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\ServerSentEvents\SseParser_1.cs (1)
409GrowBuffer(ref _dataBuffer, _dataLength + _lineLength + 1);
11 references to _dataBuffer
Microsoft.Extensions.AI.OpenAI (11)
src\Shared\ServerSentEvents\SseParser_1.cs (11)
86/// <summary>The length of valid data in <see cref="_dataBuffer"/>, starting from index 0.</summary> 88/// <summary>Whether data has been appended to <see cref="_dataBuffer"/>.</summary> 181if (_dataBuffer is not null) 183ArrayPool<byte>.Shared.Return(_dataBuffer); 261if (_dataBuffer is not null) 263ArrayPool<byte>.Shared.Return(_dataBuffer); 343T data = _itemParser(_eventType ?? SseParser.EventTypeDefault, _dataBuffer.AsSpan(0, _dataLength)); 407if (_dataBuffer is null || _dataLength + _lineLength + 1 > _dataBuffer.Length) 416_dataBuffer[_dataLength++] = LF; 419fieldValue.CopyTo(_dataBuffer.AsSpan(_dataLength));