7 writes to _count
System.Text.Json (7)
System\Text\Json\Serialization\WriteStack.cs (7)
190
_count
= 1;
201
_count
++;
212
if (
_count
++ > 0 || _indexOffset == 0)
244
_count
= 0;
251
_continuationCount =
_count
--;
253
else if (--
_count
== 0 && _indexOffset > 0)
267
if (--
_count
> 0 || _indexOffset == 0)
20 references to _count
System.Text.Json (20)
System\Text\Json\Serialization\WriteStack.cs (20)
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
"/>,
132
else if (
_count
- _indexOffset == _stack.Length)
175
return
_count
== 0 ? Current.JsonTypeInfo : Current.JsonPropertyInfo!.JsonTypeInfo;
180
Debug.Assert(_continuationCount == 0 ||
_count
< _continuationCount);
186
if (
_count
== 0 && Current.PolymorphicSerializationState == PolymorphicSerializationState.None)
199
_stack[
_count
- _indexOffset] = Current;
214
Current = _stack[
_count
- _indexOffset];
218
if (_continuationCount ==
_count
)
232
Debug.Assert(
_count
> 0);
233
Debug.Assert(_continuationCount == 0 ||
_count
< _continuationCount);
240
if (
_count
== 1 && _indexOffset > 0)
259
int currentIndex =
_count
- _indexOffset;
269
Current = _stack[
_count
- _indexOffset];
287
int currentIndex =
_count
- _indexOffset;
337
Debug.Assert(_continuationCount == 0 ||
_count
< _continuationCount);
338
int currentIndex =
_count
- _indexOffset;
392
0 => (
_count
- 1, true), // Not a continuation, report previous frames and Current.