7 writes to _count
System.Text.Json (7)
System\Text\Json\Serialization\WriteStack.cs (7)
194
_count
= 1;
205
_count
++;
216
if (
_count
++ > 0 || _indexOffset == 0)
247
_count
= 0;
254
_continuationCount =
_count
--;
256
else if (--
_count
== 0 && _indexOffset > 0)
270
if (--
_count
> 0 || _indexOffset == 0)
17 references to _count
System.Text.Json (17)
System\Text\Json\Serialization\WriteStack.cs (17)
21
public readonly int CurrentDepth =>
_count
;
35
Debug.Assert(
_count
- _indexOffset > 0);
37
return ref _stack[
_count
- _indexOffset - 1];
57
/// Offset used to derive the index of the current frame in the stack buffer from the current value of <see cref="
_count
"/>,
138
else if (
_count
- _indexOffset == _stack.Length)
181
return
_count
== 0 ? Current.JsonTypeInfo : Current.JsonPropertyInfo!.JsonTypeInfo;
190
if (
_count
== 0 && Current.PolymorphicSerializationState == PolymorphicSerializationState.None)
203
_stack[
_count
- _indexOffset] = Current;
218
Current = _stack[
_count
- _indexOffset];
222
if (_continuationCount ==
_count
)
236
Debug.Assert(
_count
> 0);
243
if (
_count
== 1 && _indexOffset > 0)
262
int currentIndex =
_count
- _indexOffset;
272
Current = _stack[
_count
- _indexOffset];
317
int stackSize = Math.Max(
_count
, _continuationCount);
355
int stackSize = Math.Max(
_count
, _continuationCount);
399
0 => (
_count
- 1, true), // Not a continuation, report previous frames and Current.