8 writes to _activeStart
Microsoft.Extensions.AI.OpenAI (8)
src\Shared\ServerSentEvents\ArrayBuffer.cs (8)
47
_activeStart
= 0;
57
_activeStart
= 0;
63
_activeStart
= 0;
81
_activeStart
= 0;
107
_activeStart
+= byteCount;
111
_activeStart
= 0;
149
_activeStart
= 0;
174
_activeStart
= 0;
13 references to _activeStart
Microsoft.Extensions.AI.OpenAI (13)
src\Shared\ServerSentEvents\ArrayBuffer.cs (13)
89
public readonly int ActiveLength => _availableStart -
_activeStart
;
90
public readonly Span<byte> ActiveSpan => new Span<byte>(_bytes,
_activeStart
, _availableStart -
_activeStart
);
91
public readonly ReadOnlySpan<byte> ActiveReadOnlySpan => new ReadOnlySpan<byte>(_bytes,
_activeStart
, _availableStart -
_activeStart
);
92
public readonly Memory<byte> ActiveMemory => new Memory<byte>(_bytes,
_activeStart
, _availableStart -
_activeStart
);
100
public readonly int ActiveStartOffset =>
_activeStart
;
109
if (
_activeStart
== _availableStart)
138
Debug.Assert(_usePool &&
_activeStart
== 0 && _availableStart == 0);
143
int totalFree =
_activeStart
+ AvailableLength;
147
Buffer.BlockCopy(_bytes,
_activeStart
, _bytes, 0, ActiveLength);
170
Buffer.BlockCopy(oldBytes,
_activeStart
, newBytes, 0, ActiveLength);