219 references to ExceptionResource
System.Text.Json (219)
System\Text\Json\Document\JsonDocument.Parse.cs (3)
480
ExceptionResource
.ExpectedJsonTokens);
506
ExceptionResource
.ExpectedJsonTokens);
628
ExceptionResource
.ExpectedStartOfValueNotFound,
System\Text\Json\Reader\Utf8JsonReader.cs (70)
286
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedJsonTokens);
742
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ObjectDepthTooLarge);
756
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.MismatchedObjectArray, JsonConstants.CloseBrace);
762
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeObjectEnd);
776
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ArrayDepthTooLarge);
790
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.MismatchedObjectArray, JsonConstants.CloseBracket);
796
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeArrayEnd);
865
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, first);
925
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ZeroDepthAtEnd);
935
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidEndOfJsonNonPrimitive);
947
private bool HasMoreData(
ExceptionResource
resource)
1098
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidEndOfJsonNonPrimitive);
1125
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfValueNotFound, marker);
1188
ExceptionResource
resource;
1192
resource =
ExceptionResource
.ExpectedTrue;
1195
resource =
ExceptionResource
.ExpectedFalse;
1199
resource =
ExceptionResource
.ExpectedNull;
1223
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]);
1247
if (!HasMoreData(
ExceptionResource
.ExpectedValueAfterPropertyNameNotFound))
1260
if (!HasMoreData(
ExceptionResource
.ExpectedValueAfterPropertyNameNotFound))
1270
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedSeparatorAfterPropertyNameNotFound, first);
1315
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.EndOfStringNotFound);
1356
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidCharacterAfterEscapeWithinString, currentByte);
1379
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidCharacterWithinString, currentByte);
1389
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.EndOfStringNotFound);
1412
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidHexCharacterWithinString, nextByte);
1477
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndOfDigitNotFound, nextByte);
1501
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedNextDigitEValueNotFound, nextByte);
1530
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndOfDigitNotFound, data[i]);
1550
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1559
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundAfterSign, nextByte);
1597
JsonHelpers.IsInRangeInclusive(nextByte, '0', '9') ?
ExceptionResource
.InvalidLeadingZeroInNumber :
ExceptionResource
.ExpectedEndOfDigitNotFound,
1644
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1652
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundAfterDecimal, nextByte);
1666
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1680
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1690
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundAfterSign, nextByte);
1752
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndAfterSingleJson, marker);
1766
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound);
1777
if (!HasMoreData(
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound))
1803
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeObjectEnd);
1805
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, first);
1818
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeArrayEnd);
1833
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.FoundInvalidCharacter, marker);
1879
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndAfterSingleJson, first);
1891
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueAfterComment, first);
1903
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound);
1914
if (!HasMoreData(
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound))
1947
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeObjectEnd);
1950
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, first);
1970
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeArrayEnd);
2007
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, first);
2049
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, first);
2118
private bool SkipAllComments(scoped ref byte marker,
ExceptionResource
resource)
2174
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, marker);
2222
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndAfterSingleJson, marker);
2235
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound);
2246
if (!HasMoreData(
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound))
2253
if (!SkipAllComments(ref marker,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound))
2271
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeObjectEnd);
2274
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, marker);
2287
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeArrayEnd);
2303
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.FoundInvalidCharacter, marker);
2332
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfValueNotFound, JsonConstants.Slash);
2338
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfValueNotFound, JsonConstants.Slash);
2443
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.UnexpectedEndOfLineSeparator);
2457
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.EndOfCommentNotFound);
2509
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidCharacterAtStartOfComment, marker);
2515
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.UnexpectedEndOfDataWhileReadingComment);
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (80)
172
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, first);
233
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ZeroDepthAtEnd);
243
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidEndOfJsonNonPrimitive);
278
private bool HasMoreDataMultiSegment(
ExceptionResource
resource)
465
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidEndOfJsonNonPrimitive);
471
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidEndOfJsonNonPrimitive);
502
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfValueNotFound, marker);
661
ExceptionResource
resource;
665
resource =
ExceptionResource
.ExpectedTrue;
668
resource =
ExceptionResource
.ExpectedFalse;
672
resource =
ExceptionResource
.ExpectedNull;
695
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]);
719
if (!HasMoreDataMultiSegment(
ExceptionResource
.ExpectedValueAfterPropertyNameNotFound))
732
if (!HasMoreDataMultiSegment(
ExceptionResource
.ExpectedValueAfterPropertyNameNotFound))
742
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedSeparatorAfterPropertyNameNotFound, first);
788
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.EndOfStringNotFound);
810
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.EndOfStringNotFound);
862
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidCharacterAfterEscapeWithinString, currentByte);
880
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidHexCharacterWithinString, nextByte);
897
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.EndOfStringNotFound);
916
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidCharacterWithinString, currentByte);
927
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.EndOfStringNotFound);
999
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidCharacterAfterEscapeWithinString, currentByte);
1017
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidHexCharacterWithinString, nextByte);
1034
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.EndOfStringNotFound);
1058
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidCharacterWithinString, currentByte);
1069
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.EndOfStringNotFound);
1180
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndOfDigitNotFound, nextByte);
1206
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedNextDigitEValueNotFound, nextByte);
1239
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndOfDigitNotFound, data[i]);
1271
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1278
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1293
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundAfterSign, nextByte);
1348
JsonHelpers.IsInRangeInclusive(nextByte, '0', '9') ?
ExceptionResource
.InvalidLeadingZeroInNumber :
ExceptionResource
.ExpectedEndOfDigitNotFound,
1440
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1447
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1460
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundAfterDecimal, nextByte);
1474
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1482
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1502
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1510
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundEndOfData);
1525
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.RequiredDigitNotFoundAfterSign, nextByte);
1591
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndAfterSingleJson, marker);
1605
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound);
1613
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound);
1625
if (!HasMoreDataMultiSegment(
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound))
1651
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeObjectEnd);
1653
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, first);
1666
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeArrayEnd);
1681
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.FoundInvalidCharacter, marker);
1727
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndAfterSingleJson, first);
1739
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueAfterComment, first);
1751
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound);
1759
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound);
1771
if (!HasMoreDataMultiSegment(
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound))
1804
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeObjectEnd);
1807
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, first);
1827
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeArrayEnd);
1864
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, first);
1908
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, first);
1977
private bool SkipAllCommentsMultiSegment(scoped ref byte marker,
ExceptionResource
resource)
2033
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, marker);
2085
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedEndAfterSingleJson, marker);
2098
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound);
2106
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound);
2118
if (!HasMoreDataMultiSegment(
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound))
2125
if (!SkipAllCommentsMultiSegment(ref marker,
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound))
2143
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeObjectEnd);
2146
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.ExpectedStartOfPropertyNotFound, marker);
2159
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.TrailingCommaNotAllowedBeforeArrayEnd);
2174
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.FoundInvalidCharacter, marker);
2249
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.UnexpectedEndOfDataWhileReadingComment);
2256
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.UnexpectedEndOfDataWhileReadingComment);
2269
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.InvalidCharacterAtStartOfComment, marker);
2286
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.UnexpectedEndOfDataWhileReadingComment);
2300
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.UnexpectedEndOfDataWhileReadingComment);
2503
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.UnexpectedEndOfLineSeparator);
2585
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.UnexpectedEndOfDataWhileReadingComment);
2592
ThrowHelper.ThrowJsonReaderException(ref this,
ExceptionResource
.UnexpectedEndOfDataWhileReadingComment);
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (3)
342
ThrowHelper.ThrowJsonReaderException(ref reader,
ExceptionResource
.ExpectedOneCompleteToken);
357
ThrowHelper.ThrowJsonReaderException(ref reader,
ExceptionResource
.NotEnoughData);
441
ExceptionResource
.ExpectedStartOfValueNotFound,
System\Text\Json\ThrowHelper.cs (49)
370
public static void ThrowJsonReaderException(ref Utf8JsonReader json,
ExceptionResource
resource, byte nextByte = default, ReadOnlySpan<byte> bytes = default)
376
public static JsonException GetJsonReaderException(ref Utf8JsonReader json,
ExceptionResource
resource, byte nextByte, ReadOnlySpan<byte> bytes)
397
private static string GetResourceString(ref Utf8JsonReader json,
ExceptionResource
resource, byte nextByte, string characters)
404
case
ExceptionResource
.ArrayDepthTooLarge:
407
case
ExceptionResource
.MismatchedObjectArray:
410
case
ExceptionResource
.TrailingCommaNotAllowedBeforeArrayEnd:
413
case
ExceptionResource
.TrailingCommaNotAllowedBeforeObjectEnd:
416
case
ExceptionResource
.EndOfStringNotFound:
419
case
ExceptionResource
.RequiredDigitNotFoundAfterSign:
422
case
ExceptionResource
.RequiredDigitNotFoundAfterDecimal:
425
case
ExceptionResource
.RequiredDigitNotFoundEndOfData:
428
case
ExceptionResource
.ExpectedEndAfterSingleJson:
431
case
ExceptionResource
.ExpectedEndOfDigitNotFound:
434
case
ExceptionResource
.ExpectedNextDigitEValueNotFound:
437
case
ExceptionResource
.ExpectedSeparatorAfterPropertyNameNotFound:
440
case
ExceptionResource
.ExpectedStartOfPropertyNotFound:
443
case
ExceptionResource
.ExpectedStartOfPropertyOrValueNotFound:
446
case
ExceptionResource
.ExpectedStartOfPropertyOrValueAfterComment:
449
case
ExceptionResource
.ExpectedStartOfValueNotFound:
452
case
ExceptionResource
.ExpectedValueAfterPropertyNameNotFound:
455
case
ExceptionResource
.FoundInvalidCharacter:
458
case
ExceptionResource
.InvalidEndOfJsonNonPrimitive:
461
case
ExceptionResource
.ObjectDepthTooLarge:
464
case
ExceptionResource
.ExpectedFalse:
467
case
ExceptionResource
.ExpectedNull:
470
case
ExceptionResource
.ExpectedTrue:
473
case
ExceptionResource
.InvalidCharacterWithinString:
476
case
ExceptionResource
.InvalidCharacterAfterEscapeWithinString:
479
case
ExceptionResource
.InvalidHexCharacterWithinString:
482
case
ExceptionResource
.EndOfCommentNotFound:
485
case
ExceptionResource
.ZeroDepthAtEnd:
488
case
ExceptionResource
.ExpectedJsonTokens:
491
case
ExceptionResource
.NotEnoughData:
494
case
ExceptionResource
.ExpectedOneCompleteToken:
497
case
ExceptionResource
.InvalidCharacterAtStartOfComment:
500
case
ExceptionResource
.UnexpectedEndOfDataWhileReadingComment:
503
case
ExceptionResource
.UnexpectedEndOfLineSeparator:
506
case
ExceptionResource
.InvalidLeadingZeroInNumber:
518
public static void ThrowInvalidOperationException(
ExceptionResource
resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType)
593
public static InvalidOperationException GetInvalidOperationException(
ExceptionResource
resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType)
609
private static string GetResourceString(
ExceptionResource
resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType)
614
case
ExceptionResource
.MismatchedObjectArray:
620
case
ExceptionResource
.DepthTooLarge:
623
case
ExceptionResource
.CannotStartObjectArrayWithoutProperty:
626
case
ExceptionResource
.CannotStartObjectArrayAfterPrimitiveOrClose:
629
case
ExceptionResource
.CannotWriteValueWithinObject:
632
case
ExceptionResource
.CannotWritePropertyWithinArray:
637
case
ExceptionResource
.CannotWriteValueAfterPrimitiveOrClose:
640
case
ExceptionResource
.CannotWriteWithinString:
System\Text\Json\Writer\Utf8JsonWriter.cs (6)
642
ThrowInvalidOperationException(
ExceptionResource
.CannotWriteWithinString);
651
ThrowInvalidOperationException(
ExceptionResource
.CannotStartObjectArrayWithoutProperty);
658
ThrowInvalidOperationException(
ExceptionResource
.CannotStartObjectArrayAfterPrimitiveOrClose);
1233
private void ThrowInvalidOperationException(
ExceptionResource
resource)
1239
=> ThrowHelper.ThrowInvalidOperationException(
ExceptionResource
.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType);
1244
=> ThrowHelper.ThrowInvalidOperationException(
ExceptionResource
.DepthTooLarge, _currentDepth, _options.MaxDepth, token: default, tokenType: default);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Helpers.cs (2)
68
ThrowInvalidOperationException(
ExceptionResource
.CannotWriteWithinString);
72
ThrowInvalidOperationException(
ExceptionResource
.CannotWritePropertyWithinArray);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Helpers.cs (6)
58
ThrowInvalidOperationException(
ExceptionResource
.CannotWriteWithinString);
67
ThrowInvalidOperationException(
ExceptionResource
.CannotWriteValueWithinObject);
73
ThrowInvalidOperationException(
ExceptionResource
.CannotWriteValueAfterPrimitiveOrClose);
107
ThrowInvalidOperationException(
ExceptionResource
.CannotWriteValueWithinObject);
113
ThrowInvalidOperationException(
ExceptionResource
.CannotWriteValueAfterPrimitiveOrClose);
121
ThrowInvalidOperationException(
ExceptionResource
.CannotWriteWithinString);