2 writes to _array
System.Text.Json (2)
System\Text\Json\BitStack.cs (2)
63
_array
??= new int[DefaultInitialArraySize];
141
Array.Resize(ref
_array
, nextDouble);
20 references to _array
System.Text.Json (20)
System\Text\Json\BitStack.cs (20)
67
Debug.Assert(index >= 0, $"Set - Negative - index: {index}, arrayLength: {
_array
.Length}");
70
Debug.Assert(
_array
.Length <= int.MaxValue / 32 + 1, $"index: {index}, arrayLength: {
_array
.Length}");
76
if (elementIndex >=
_array
.Length)
79
Debug.Assert(index >= 0 && index > (int)((uint)
_array
.Length * 32 - 1), $"Only grow when necessary - index: {index}, arrayLength: {
_array
.Length}");
83
Debug.Assert(elementIndex <
_array
.Length, $"Set - index: {index}, elementIndex: {elementIndex}, arrayLength: {
_array
.Length}, extraBits: {extraBits}");
85
int newValue =
_array
[elementIndex];
94
_array
[elementIndex] = newValue;
122
Debug.Assert(
_array
!= null);
123
Debug.Assert(index >= 0, $"Get - Negative - index: {index}, arrayLength: {
_array
.Length}");
127
Debug.Assert(elementIndex <
_array
.Length, $"Get - index: {index}, elementIndex: {elementIndex}, arrayLength: {
_array
.Length}, extraBits: {extraBits}");
129
return (
_array
[elementIndex] & (1 << extraBits)) != 0;
134
Debug.Assert(
_array
!= null);
135
Debug.Assert(
_array
.Length < int.MaxValue / 2, $"Array too large - arrayLength: {
_array
.Length}");
136
Debug.Assert(minSize >= 0 && minSize >=
_array
.Length);
138
int nextDouble = Math.Max(minSize + 1,
_array
.Length * 2);