7 writes to _count
System.Text.Json (7)
System\Text\Json\Serialization\WriteStack.cs (7)
191
_count
= 1;
202
_count
++;
213
if (
_count
++ > 0 || _indexOffset == 0)
244
_count
= 0;
251
_continuationCount =
_count
--;
253
else if (--
_count
== 0 && _indexOffset > 0)
267
if (--
_count
> 0 || _indexOffset == 0)
17 references to _count
System.Text.Json (17)
System\Text\Json\Serialization\WriteStack.cs (17)
20
public readonly int CurrentDepth =>
_count
;
34
Debug.Assert(
_count
- _indexOffset > 0);
36
return ref _stack[
_count
- _indexOffset - 1];
56
/// Offset used to derive the index of the current frame in the stack buffer from the current value of <see cref="
_count
"/>,
135
else if (
_count
- _indexOffset == _stack.Length)
178
return
_count
== 0 ? Current.JsonTypeInfo : Current.JsonPropertyInfo!.JsonTypeInfo;
187
if (
_count
== 0 && Current.PolymorphicSerializationState == PolymorphicSerializationState.None)
200
_stack[
_count
- _indexOffset] = Current;
215
Current = _stack[
_count
- _indexOffset];
219
if (_continuationCount ==
_count
)
233
Debug.Assert(
_count
> 0);
240
if (
_count
== 1 && _indexOffset > 0)
259
int currentIndex =
_count
- _indexOffset;
269
Current = _stack[
_count
- _indexOffset];
314
int stackSize = Math.Max(
_count
, _continuationCount);
352
int stackSize = Math.Max(
_count
, _continuationCount);
396
0 => (
_count
- 1, true), // Not a continuation, report previous frames and Current.