64 references to JsonNodeType
System.Private.DataContractSerialization (64)
System\Runtime\Serialization\Json\XmlJsonReader.cs (15)
286
private
JsonNodeType
[]? _scopes;
327
return ((_scopeDepth > 0) && (_scopes![_scopeDepth] ==
JsonNodeType
.Collection));
530
EnterJsonScope(
JsonNodeType
.Object);
566
EnterJsonScope(
JsonNodeType
.Object);
573
EnterJsonScope(
JsonNodeType
.Object);
584
EnterJsonScope(
JsonNodeType
.Element);
1004
private void EnterJsonScope(
JsonNodeType
currentNodeType)
1009
_scopes = new
JsonNodeType
[4];
1013
JsonNodeType
[] newScopes = new
JsonNodeType
[_scopeDepth * 2];
1020
private
JsonNodeType
ExitJsonScope()
1022
JsonNodeType
nodeTypeToReturn = _scopes![_scopeDepth];
1023
_scopes[_scopeDepth] =
JsonNodeType
.None;
1168
EnterJsonScope(
JsonNodeType
.Collection);
1289
EnterJsonScope(
JsonNodeType
.Object);
System\Runtime\Serialization\Json\XmlJsonWriter.cs (49)
75
private
JsonNodeType
_nodeType;
77
private
JsonNodeType
[]? _scopes;
143
case
JsonNodeType
.None:
145
case
JsonNodeType
.Element:
147
case
JsonNodeType
.QuotedText:
148
case
JsonNodeType
.StandaloneText:
149
case
JsonNodeType
.EndElement:
171
private bool IsWritingCollection => (_depth > 0) && (_scopes![_depth] ==
JsonNodeType
.Collection);
526
if (_nodeType !=
JsonNodeType
.None)
553
JsonNodeType
token = ExitScope();
554
if (token ==
JsonNodeType
.Collection)
559
if (_nodeType ==
JsonNodeType
.Element)
572
else if (_nodeType ==
JsonNodeType
.QuotedText)
577
else if (_nodeType ==
JsonNodeType
.Element)
603
Debug.Assert((_nodeType ==
JsonNodeType
.StandaloneText) || (_nodeType ==
JsonNodeType
.EndElement),
608
if (token ==
JsonNodeType
.Element)
612
else if (token ==
JsonNodeType
.Object)
617
if (_nodeType ==
JsonNodeType
.Element)
628
if ((_depth > 0) && _scopes![_depth] ==
JsonNodeType
.Element)
637
_nodeType =
JsonNodeType
.EndElement;
750
if ((_nodeType !=
JsonNodeType
.Element) && !_wroteServerTypeAttribute)
857
if ((_nodeType !=
JsonNodeType
.None) && _depth == 0)
864
case
JsonNodeType
.None:
870
EnterScope(
JsonNodeType
.Element);
873
case
JsonNodeType
.Element:
895
EnterScope(
JsonNodeType
.Element);
898
case
JsonNodeType
.EndElement:
920
EnterScope(
JsonNodeType
.Element);
933
_nodeType =
JsonNodeType
.Element;
947
if (!((_dataType == JsonDataType.Array || _dataType == JsonDataType.Object || _nodeType ==
JsonNodeType
.EndElement) && XmlConverter.IsWhitespace(text)))
1105
private void CheckText(
JsonNodeType
nextNodeType)
1116
if ((nextNodeType ==
JsonNodeType
.StandaloneText) &&
1117
(_nodeType ==
JsonNodeType
.QuotedText))
1123
private void EnterScope(
JsonNodeType
currentNodeType)
1128
_scopes = new
JsonNodeType
[4];
1132
JsonNodeType
[] newScopes = new
JsonNodeType
[_depth * 2];
1139
private
JsonNodeType
ExitScope()
1141
JsonNodeType
nodeTypeToReturn = _scopes![_depth];
1142
_scopes[_depth] =
JsonNodeType
.None;
1149
_nodeType =
JsonNodeType
.None;
1204
CheckText(
JsonNodeType
.QuotedText);
1205
if (_nodeType !=
JsonNodeType
.QuotedText)
1209
_nodeType =
JsonNodeType
.QuotedText;
1214
CheckText(
JsonNodeType
.StandaloneText);
1215
_nodeType =
JsonNodeType
.StandaloneText;
1261
EnterScope(
JsonNodeType
.Collection);
1268
EnterScope(
JsonNodeType
.Object);