1 write to _dataBuffer
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\ServerSentEvents\SseParser_1.cs (1)
409
GrowBuffer(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>
181
if (
_dataBuffer
is not null)
183
ArrayPool<byte>.Shared.Return(
_dataBuffer
);
261
if (
_dataBuffer
is not null)
263
ArrayPool<byte>.Shared.Return(
_dataBuffer
);
343
T data = _itemParser(_eventType ?? SseParser.EventTypeDefault,
_dataBuffer
.AsSpan(0, _dataLength));
407
if (
_dataBuffer
is null || _dataLength + _lineLength + 1 >
_dataBuffer
.Length)
416
_dataBuffer
[_dataLength++] = LF;
419
fieldValue.CopyTo(
_dataBuffer
.AsSpan(_dataLength));