6 writes to _bytes
System.Net.Http (6)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (6)
43
_bytes
= initialSize == 0
55
_bytes
= buffer;
66
_bytes
= null!;
84
_bytes
= Array.Empty<byte>();
138
_bytes
= ArrayPool<byte>.Shared.Rent(byteCount);
176
_bytes
= newBytes;
17 references to _bytes
System.Net.Http (17)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (17)
65
byte[] array =
_bytes
;
78
Debug.Assert(
_bytes
is not null);
83
byte[] bufferToReturn =
_bytes
;
89
public Span<byte> ActiveSpan => new Span<byte>(
_bytes
, _activeStart, _availableStart - _activeStart);
90
public ReadOnlySpan<byte> ActiveReadOnlySpan => new ReadOnlySpan<byte>(
_bytes
, _activeStart, _availableStart - _activeStart);
91
public Memory<byte> ActiveMemory => new Memory<byte>(
_bytes
, _activeStart, _availableStart - _activeStart);
93
public int AvailableLength =>
_bytes
.Length - _availableStart;
94
public Span<byte> AvailableSpan =>
_bytes
.AsSpan(_availableStart);
95
public Memory<byte> AvailableMemory =>
_bytes
.AsMemory(_availableStart);
96
public Memory<byte> AvailableMemorySliced(int length) => new Memory<byte>(
_bytes
, _availableStart, length);
98
public int Capacity =>
_bytes
.Length;
101
public byte[] DangerousGetUnderlyingBuffer() =>
_bytes
;
135
if (
_bytes
.Length == 0)
146
Buffer.BlockCopy(
_bytes
, _activeStart,
_bytes
, 0, ActiveLength);
161
int newSize = Math.Max(desiredSize, (int)Math.Min(ArrayMaxLength, 2 * (uint)
_bytes
.Length));
166
byte[] oldBytes =
_bytes
;