8 writes to _availableStart
Microsoft.Extensions.AI.OpenAI (8)
src\Shared\ServerSentEvents\ArrayBuffer.cs (8)
48
_availableStart
= 0;
58
_availableStart
= 0;
64
_availableStart
= 0;
82
_availableStart
= 0;
112
_availableStart
= 0;
119
_availableStart
+= byteCount;
148
_availableStart
= ActiveLength;
173
_availableStart
= ActiveLength;
10 references to _availableStart
Microsoft.Extensions.AI.OpenAI (10)
src\Shared\ServerSentEvents\ArrayBuffer.cs (10)
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);
94
public readonly int AvailableLength => _bytes.Length -
_availableStart
;
95
public readonly Span<byte> AvailableSpan => _bytes.AsSpan(
_availableStart
);
96
public readonly Memory<byte> AvailableMemory => _bytes.AsMemory(
_availableStart
);
97
public readonly Memory<byte> AvailableMemorySliced(int length) => new Memory<byte>(_bytes,
_availableStart
, length);
109
if (_activeStart ==
_availableStart
)
138
Debug.Assert(_usePool && _activeStart == 0 &&
_availableStart
== 0);