5 writes to _rentedBuffer
Microsoft.Extensions.Logging.Console (5)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (5)
42
_rentedBuffer
= ArrayPool<byte>.Shared.Rent(initialCapacity);
99
_rentedBuffer
= null;
122
_rentedBuffer
= null;
131
_rentedBuffer
= ArrayPool<byte>.Shared.Rent(initialCapacity);
202
_rentedBuffer
= ArrayPool<byte>.Shared.Rent(newSize);
27 references to _rentedBuffer
Microsoft.Extensions.Logging.Console (27)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (27)
55
Debug.Assert(
_rentedBuffer
!= null);
56
Debug.Assert(_index <=
_rentedBuffer
.Length);
57
return
_rentedBuffer
.AsMemory(0, _index);
65
Debug.Assert(
_rentedBuffer
!= null);
74
Debug.Assert(
_rentedBuffer
!= null);
75
return
_rentedBuffer
.Length;
83
Debug.Assert(
_rentedBuffer
!= null);
84
return
_rentedBuffer
.Length - _index;
95
Debug.Assert(
_rentedBuffer
!= null);
98
byte[] toReturn =
_rentedBuffer
;
105
Debug.Assert(
_rentedBuffer
!= null);
106
Debug.Assert(_index <=
_rentedBuffer
.Length);
108
_rentedBuffer
.AsSpan(0, _index).Clear();
115
if (
_rentedBuffer
== null)
121
byte[] toReturn =
_rentedBuffer
;
129
Debug.Assert(
_rentedBuffer
is null);
139
Debug.Assert(
_rentedBuffer
!= null);
141
Debug.Assert(_index <=
_rentedBuffer
.Length - count);
148
return
_rentedBuffer
.AsMemory(_index);
154
return
_rentedBuffer
.AsSpan(_index);
172
Debug.Assert(
_rentedBuffer
!= null);
175
int currentLength =
_rentedBuffer
.Length;
200
byte[] oldBuffer =
_rentedBuffer
;
205
Debug.Assert(
_rentedBuffer
.Length >= _index);
208
oldBufferAsSpan.CopyTo(
_rentedBuffer
);
213
Debug.Assert(
_rentedBuffer
.Length - _index > 0);
214
Debug.Assert(
_rentedBuffer
.Length - _index >= sizeHint);