85 writes to _tokenType
System.Text.Json (85)
System\Text\Json\Writer\Utf8JsonWriter.cs (11)
269_tokenType = default; 464_tokenType = JsonTokenType.StartArray; 477_tokenType = JsonTokenType.StartObject; 599_tokenType = JsonTokenType.StartArray; 613_tokenType = JsonTokenType.StartObject; 650_tokenType = JsonTokenType.StartArray; 675_tokenType = JsonTokenType.StartObject; 805_tokenType = JsonTokenType.StartArray; 830_tokenType = JsonTokenType.StartObject; 895_tokenType = JsonTokenType.EndArray; 907_tokenType = JsonTokenType.EndObject;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (3)
28_tokenType = JsonTokenType.String; 78_tokenType = JsonTokenType.String; 102_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (3)
32_tokenType = JsonTokenType.String; 84_tokenType = JsonTokenType.String; 109_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (3)
31_tokenType = JsonTokenType.String; 83_tokenType = JsonTokenType.String; 108_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (3)
31_tokenType = JsonTokenType.Number; 83_tokenType = JsonTokenType.Number; 108_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (3)
33_tokenType = JsonTokenType.Number; 86_tokenType = JsonTokenType.Number; 112_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (3)
33_tokenType = JsonTokenType.Number; 86_tokenType = JsonTokenType.Number; 112_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.FormattedNumber.cs (3)
38_tokenType = JsonTokenType.Number; 68_tokenType = JsonTokenType.Number; 79_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (3)
31_tokenType = JsonTokenType.String; 83_tokenType = JsonTokenType.String; 108_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (9)
23_tokenType = JsonTokenType.Null; 34_tokenType = JsonTokenType.Null; 45_tokenType = JsonTokenType.Null; 105_tokenType = JsonTokenType.Null; 130_tokenType = JsonTokenType.Null; 146_tokenType = JsonTokenType.True; 151_tokenType = JsonTokenType.False; 204_tokenType = value ? JsonTokenType.True : JsonTokenType.False; 230_tokenType = value ? JsonTokenType.True : JsonTokenType.False;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (3)
31_tokenType = JsonTokenType.Number; 83_tokenType = JsonTokenType.Number; 108_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (14)
38_tokenType = JsonTokenType.PropertyName; 50_tokenType = JsonTokenType.PropertyName; 109_tokenType = JsonTokenType.PropertyName; 258_tokenType = JsonTokenType.PropertyName; 268_tokenType = JsonTokenType.PropertyName; 436_tokenType = JsonTokenType.String; 526_tokenType = JsonTokenType.String; 550_tokenType = JsonTokenType.String; 622_tokenType = JsonTokenType.String; 672_tokenType = JsonTokenType.String; 712_tokenType = JsonTokenType.String; 762_tokenType = JsonTokenType.String; 802_tokenType = JsonTokenType.String; 874_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (3)
32_tokenType = JsonTokenType.Number; 86_tokenType = JsonTokenType.Number; 112_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (1)
29_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTime.cs (1)
39_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTimeOffset.cs (1)
40_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Decimal.cs (1)
39_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Double.cs (1)
43_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Float.cs (1)
43_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.FormattedNumber.cs (1)
44_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Guid.cs (1)
39_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Literal.cs (3)
21_tokenType = JsonTokenType.Null; 36_tokenType = JsonTokenType.True; 41_tokenType = JsonTokenType.False;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (4)
161_tokenType = JsonTokenType.String; 168_tokenType = reader.TokenType; 252_tokenType = JsonTokenType.String; 259_tokenType = reader.TokenType;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.SignedNumber.cs (1)
52_tokenType = JsonTokenType.Number;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (4)
26_tokenType = JsonTokenType.String; 79_tokenType = JsonTokenType.String; 226_tokenType = JsonTokenType.String; 364_tokenType = JsonTokenType.String;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.UnsignedNumber.cs (1)
54_tokenType = JsonTokenType.Number;
116 references to _tokenType
System.Text.Json (116)
System\Text\Json\Writer\Utf8JsonWriter.cs (18)
89internal JsonTokenType TokenType => _tokenType; 539if (_tokenType != JsonTokenType.PropertyName) 541Debug.Assert(_tokenType != JsonTokenType.None && _tokenType != JsonTokenType.StartArray); 542ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotStartObjectArrayWithoutProperty, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType); 547Debug.Assert(_tokenType != JsonTokenType.PropertyName); 548Debug.Assert(_tokenType != JsonTokenType.StartObject); 551if (CurrentDepth == 0 && _tokenType != JsonTokenType.None) 553ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotStartObjectArrayAfterPrimitiveOrClose, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType); 578if (_tokenType is not JsonTokenType.PropertyName and not JsonTokenType.None || _commentAfterNoneOrPropertyName) 962if (_bitStack.CurrentDepth <= 0 || _tokenType == JsonTokenType.PropertyName) 963ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType); 969Debug.Assert(_tokenType != JsonTokenType.None); 970ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType); 979ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType); 989if (_tokenType == JsonTokenType.StartObject || _tokenType == JsonTokenType.StartArray) 1006Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.None);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (4)
305Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 307if (_tokenType != JsonTokenType.None) 355Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 357if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (4)
307Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 309if (_tokenType != JsonTokenType.None) 355Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 357if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (4)
306Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 308if (_tokenType != JsonTokenType.None) 354Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 356if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (4)
300Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 302if (_tokenType != JsonTokenType.None) 345Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 347if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (4)
304Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 306if (_tokenType != JsonTokenType.None) 349Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 351if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (4)
304Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 306if (_tokenType != JsonTokenType.None) 349Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 351if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (4)
308Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 310if (_tokenType != JsonTokenType.None) 357Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 359if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Helpers.cs (10)
39if (!_inObject || _tokenType == JsonTokenType.PropertyName) 41Debug.Assert(_tokenType != JsonTokenType.StartObject); 42ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotWritePropertyWithinArray, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType); 52if (!_inObject || _tokenType == JsonTokenType.PropertyName) 54Debug.Assert(_tokenType != JsonTokenType.StartObject); 55ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotWritePropertyWithinArray, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType); 111Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 113if (_tokenType != JsonTokenType.None) 184Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 186if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (4)
451Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 453if (_tokenType != JsonTokenType.None) 496Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 498if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (4)
376Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 378if (_tokenType != JsonTokenType.None) 421Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 423if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (11)
211if (_tokenType != JsonTokenType.None) 398Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 400if (_tokenType != JsonTokenType.None) 1537Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 1539if (_tokenType != JsonTokenType.None) 1586Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 1588if (_tokenType != JsonTokenType.None) 1638Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 1640if (_tokenType != JsonTokenType.None) 1689Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 1691if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (4)
385Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 387if (_tokenType != JsonTokenType.None) 430Debug.Assert(_options.SkipValidation || _tokenType != JsonTokenType.PropertyName); 432if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (2)
121if (_tokenType != JsonTokenType.PropertyName) 123if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Comment.cs (4)
56if (_tokenType is JsonTokenType.PropertyName or JsonTokenType.None) 123if (_tokenType != JsonTokenType.None || _commentAfterNoneOrPropertyName) 171if (_tokenType is JsonTokenType.PropertyName or JsonTokenType.None) 229if (_tokenType != JsonTokenType.None || _commentAfterNoneOrPropertyName)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTime.cs (2)
86if (_tokenType != JsonTokenType.PropertyName) 88if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTimeOffset.cs (2)
87if (_tokenType != JsonTokenType.PropertyName) 89if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Decimal.cs (2)
82if (_tokenType != JsonTokenType.PropertyName) 84if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Double.cs (2)
86if (_tokenType != JsonTokenType.PropertyName) 88if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Float.cs (2)
86if (_tokenType != JsonTokenType.PropertyName) 88if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.FormattedNumber.cs (2)
88if (_tokenType != JsonTokenType.PropertyName) 90if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Guid.cs (2)
87if (_tokenType != JsonTokenType.PropertyName) 89if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Helpers.cs (7)
19if (_tokenType != JsonTokenType.PropertyName) 21Debug.Assert(_tokenType != JsonTokenType.None && _tokenType != JsonTokenType.StartArray); 22ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotWriteValueWithinObject, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType); 27Debug.Assert(_tokenType != JsonTokenType.PropertyName); 30if (CurrentDepth == 0 && _tokenType != JsonTokenType.None) 32ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotWriteValueAfterPrimitiveOrClose, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Literal.cs (2)
106if (_tokenType != JsonTokenType.PropertyName) 108if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.SignedNumber.cs (2)
95if (_tokenType != JsonTokenType.PropertyName) 97if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (4)
166if (_tokenType != JsonTokenType.PropertyName) 168if (_tokenType != JsonTokenType.None) 312if (_tokenType != JsonTokenType.PropertyName) 314if (_tokenType != JsonTokenType.None)
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.UnsignedNumber.cs (2)
97if (_tokenType != JsonTokenType.PropertyName) 99if (_tokenType != JsonTokenType.None)