738 references to ThrowHelper
System.Text.Json (738)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (1)
196ThrowHelper.ThrowOutOfMemoryException_BufferMaximumSizeExceeded((uint)newSize);
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (1)
28ThrowHelper.ThrowArgumentNullException(nameof(name));
System\ReflectionExtensions.cs (1)
90ThrowHelper.ThrowInvalidOperationException_SerializationDuplicateAttribute(typeof(TAttribute), memberInfo);
System\Text\Json\Document\JsonDocument.cs (3)
108ThrowHelper.ThrowArgumentNullException(nameof(writer)); 1106ThrowHelper.ThrowObjectDisposedException_JsonDocument(); 1114ThrowHelper.ThrowJsonElementWrongTypeException(expected, actual);
System\Text\Json\Document\JsonDocument.Parse.cs (6)
122ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 203ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 334ThrowHelper.ThrowArgumentNullException(nameof(json)); 458ThrowHelper.ThrowJsonReaderException( 484ThrowHelper.ThrowJsonReaderException( 606ThrowHelper.ThrowJsonReaderException(
System\Text\Json\Document\JsonDocumentOptions.cs (1)
56ThrowHelper.ThrowArgumentOutOfRangeException_MaxDepthMustBePositive(nameof(value));
System\Text\Json\Document\JsonElement.cs (18)
137ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 260ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 364throw ThrowHelper.GetJsonElementWrongTypeException(nameof(Boolean), actualType.ToValueKind()); 434ThrowHelper.ThrowFormatException(); 679ThrowHelper.ThrowFormatException(); 731ThrowHelper.ThrowFormatException(); 781ThrowHelper.ThrowFormatException(); 833ThrowHelper.ThrowFormatException(); 900ThrowHelper.ThrowFormatException(); 967ThrowHelper.ThrowFormatException(); 1019ThrowHelper.ThrowFormatException(); 1070ThrowHelper.ThrowFormatException(); 1121ThrowHelper.ThrowFormatException(); 1172ThrowHelper.ThrowFormatException(); 1267ThrowHelper.ThrowInsufficientExecutionStackException_JsonElementDeepEqualsInsufficientExecutionStack(); 1551ThrowHelper.ThrowArgumentNullException(nameof(writer)); 1586ThrowHelper.ThrowJsonElementWrongTypeException(JsonTokenType.StartArray, tokenType); 1612ThrowHelper.ThrowJsonElementWrongTypeException(JsonTokenType.StartObject, tokenType);
System\Text\Json\Document\JsonProperty.cs (1)
119ThrowHelper.ThrowArgumentNullException(nameof(writer));
System\Text\Json\JsonEncodedText.cs (1)
55ThrowHelper.ThrowArgumentNullException(nameof(value));
System\Text\Json\JsonHelpers.cs (2)
297ThrowHelper.ThrowOutOfMemoryException(length); 476ThrowHelper.ThrowArgumentOutOfRangeException_JsonNumberExponentTooLarge(nameof(exponent));
System\Text\Json\Nodes\JsonArray.cs (1)
268ThrowHelper.ThrowArgumentNullException(nameof(writer));
System\Text\Json\Nodes\JsonArray.IList.cs (4)
129ThrowHelper.ThrowArgumentNullException(nameof(match)); 161ThrowHelper.ThrowArgumentOutOfRangeException_NeedNonNegNum(nameof(index)); 166ThrowHelper.ThrowArgumentOutOfRangeException_NeedNonNegNum(nameof(count)); 173ThrowHelper.ThrowArgumentException_InvalidOffLen();
System\Text\Json\Nodes\JsonNode.cs (9)
67ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonArray)); 88ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonObject)); 109ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonValue)); 218ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonArray), nameof(JsonObject)); 223ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonArray), nameof(JsonObject)); 275ThrowHelper.ThrowInvalidOperationException_NodeParentWrongType(nameof(JsonObject)); 293ThrowHelper.ThrowInvalidOperationException_NodeParentWrongType(nameof(JsonArray)); 348ThrowHelper.ThrowInvalidOperationException_NodeAlreadyHasParent(); 356ThrowHelper.ThrowInvalidOperationException_NodeCycleDetected();
System\Text\Json\Nodes\JsonNode.Parse.cs (3)
77ThrowHelper.ThrowArgumentNullException(nameof(json)); 125ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 154ThrowHelper.ThrowArgumentNullException(nameof(utf8Json));
System\Text\Json\Nodes\JsonObject.cs (4)
125ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 136ThrowHelper.ThrowArgumentNullException(nameof(writer)); 209ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 246ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Nodes\JsonObject.IDictionary.cs (4)
30ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 86ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 111ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 200ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Nodes\JsonObject.IList.cs (3)
28ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 60ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 77ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Nodes\JsonValue.cs (4)
59ThrowHelper.ThrowArgumentException_NodeValueNotAllowed(nameof(value)); 86ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 96ThrowHelper.ThrowArgumentException_NodeValueNotAllowed(nameof(value)); 190ThrowHelper.ThrowInvalidOperationException_NodeElementCannotBeObjectOrArray();
System\Text\Json\Nodes\JsonValueOfElement.cs (2)
44ThrowHelper.ThrowInvalidOperationException_NodeUnableToConvertElement(Value.ValueKind, typeof(TypeToConvert)); 201ThrowHelper.ThrowArgumentNullException(nameof(writer));
System\Text\Json\Nodes\JsonValueOfT.cs (1)
34ThrowHelper.ThrowInvalidOperationException_NodeUnableToConvert(typeof(TValue), typeof(T));
System\Text\Json\Nodes\JsonValueOfTCustomized.cs (1)
33ThrowHelper.ThrowArgumentNullException(nameof(writer));
System\Text\Json\Nodes\JsonValueOfTPrimitive.cs (1)
46ThrowHelper.ThrowArgumentNullException(nameof(writer));
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (8)
280throw ThrowHelper.GetInvalidOperationException_ReadInvalidUTF8(ex); 312throw ThrowHelper.GetInvalidOperationException_ReadInvalidUTF8(dfe); 327throw ThrowHelper.GetInvalidOperationException_ReadInvalidUTF8(); 387throw ThrowHelper.GetArgumentException_ReadInvalidUTF16(ex); 420throw ThrowHelper.GetArgumentException_ReadInvalidUTF16(ex); 544ThrowHelper.ThrowInvalidOperationException_ReadInvalidUTF16(scalar); 552ThrowHelper.ThrowInvalidOperationException_ReadIncompleteUTF16(); 565ThrowHelper.ThrowInvalidOperationException_ReadInvalidUTF16(lowSurrogate);
System\Text\Json\Reader\JsonReaderOptions.cs (2)
35ThrowHelper.ThrowArgumentOutOfRangeException_CommentEnumMustBeInRange(nameof(value)); 58ThrowHelper.ThrowArgumentOutOfRangeException_MaxDepthMustBePositive(nameof(value));
System\Text\Json\Reader\Utf8JsonReader.cs (62)
286ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedJsonTokens); 315ThrowHelper.ThrowInvalidOperationException_CannotSkipOnPartial(); 457ThrowHelper.ThrowInvalidOperationException_ExpectedStringComparison(TokenType); 528ThrowHelper.ThrowInvalidOperationException_ExpectedStringComparison(TokenType); 742ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ObjectDepthTooLarge); 756ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.MismatchedObjectArray, JsonConstants.CloseBrace); 762ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 776ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ArrayDepthTooLarge); 790ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.MismatchedObjectArray, JsonConstants.CloseBracket); 796ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 865ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 925ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ZeroDepthAtEnd); 935ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive); 953ThrowHelper.ThrowJsonReaderException(ref this, resource); 1098ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive); 1125ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfValueNotFound, marker); 1202ThrowHelper.ThrowJsonReaderException(ref this, resource, bytes: span); 1223ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); 1270ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedSeparatorAfterPropertyNameNotFound, first); 1315ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 1356ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAfterEscapeWithinString, currentByte); 1379ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterWithinString, currentByte); 1389ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 1412ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidHexCharacterWithinString, nextByte); 1477ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, nextByte); 1501ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedNextDigitEValueNotFound, nextByte); 1530ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, data[i]); 1550ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1559ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterSign, nextByte); 1596ThrowHelper.ThrowJsonReaderException(ref this, 1644ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1652ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterDecimal, nextByte); 1666ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1680ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1690ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterSign, nextByte); 1752ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, marker); 1766ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1803ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 1805ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1818ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 1833ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.FoundInvalidCharacter, marker); 1879ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, first); 1891ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueAfterComment, first); 1903ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1947ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 1950ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1970ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 2007ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 2049ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 2174ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, marker); 2222ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, marker); 2235ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 2271ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 2274ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, marker); 2287ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 2303ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.FoundInvalidCharacter, marker); 2332ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfValueNotFound, JsonConstants.Slash); 2338ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfValueNotFound, JsonConstants.Slash); 2443ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfLineSeparator); 2457ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfCommentNotFound); 2509ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAtStartOfComment, marker); 2515ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment);
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (70)
172ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 233ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ZeroDepthAtEnd); 243ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive); 284ThrowHelper.ThrowJsonReaderException(ref this, resource); 290ThrowHelper.ThrowJsonReaderException(ref this, resource); 465ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive); 471ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidEndOfJsonNonPrimitive); 502ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfValueNotFound, marker); 668return ThrowHelper.GetJsonReaderException(ref this, resource, nextByte: default, bytes: span); 688ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, _buffer[_consumed - 1]); 735ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedSeparatorAfterPropertyNameNotFound, first); 781ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 803ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 855ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAfterEscapeWithinString, currentByte); 873ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidHexCharacterWithinString, nextByte); 890ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 909ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterWithinString, currentByte); 920ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 992ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAfterEscapeWithinString, currentByte); 1010ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidHexCharacterWithinString, nextByte); 1027ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 1051ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterWithinString, currentByte); 1062ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.EndOfStringNotFound); 1173ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, nextByte); 1199ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedNextDigitEValueNotFound, nextByte); 1232ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndOfDigitNotFound, data[i]); 1264ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1271ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1286ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterSign, nextByte); 1340ThrowHelper.ThrowJsonReaderException(ref this, 1433ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1440ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1453ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterDecimal, nextByte); 1467ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1475ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1495ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1503ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundEndOfData); 1518ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.RequiredDigitNotFoundAfterSign, nextByte); 1584ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, marker); 1598ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1606ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1644ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 1646ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1659ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 1674ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.FoundInvalidCharacter, marker); 1720ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, first); 1732ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueAfterComment, first); 1744ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1752ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 1797ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 1800ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1820ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 1857ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 1901ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, first); 2026ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, marker); 2078ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedEndAfterSingleJson, marker); 2091ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 2099ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyOrValueNotFound); 2136ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeObjectEnd); 2139ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.ExpectedStartOfPropertyNotFound, marker); 2152ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.TrailingCommaNotAllowedBeforeArrayEnd); 2167ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.FoundInvalidCharacter, marker); 2242ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment); 2249ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment); 2262ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.InvalidCharacterAtStartOfComment, marker); 2279ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment); 2293ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment); 2496ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfLineSeparator); 2578ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment); 2585ThrowHelper.ThrowJsonReaderException(ref this, ExceptionResource.UnexpectedEndOfDataWhileReadingComment);
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (52)
36ThrowHelper.ThrowInvalidOperationException_ExpectedString(TokenType); 73ThrowHelper.ThrowInvalidOperationException_ExpectedString(_tokenType); 91ThrowHelper.ThrowArgumentException_DestinationTooShort(); 137ThrowHelper.ThrowInvalidOperationException_ExpectedString(_tokenType); 243ThrowHelper.ThrowInvalidOperationException_ExpectedComment(TokenType); 267ThrowHelper.ThrowInvalidOperationException_ExpectedBoolean(TokenType); 290ThrowHelper.ThrowFormatException(DataType.Base64String); 314ThrowHelper.ThrowFormatException(NumericType.Byte); 324ThrowHelper.ThrowFormatException(NumericType.Byte); 349ThrowHelper.ThrowFormatException(NumericType.SByte); 359ThrowHelper.ThrowFormatException(NumericType.SByte); 383ThrowHelper.ThrowFormatException(NumericType.Int16); 393ThrowHelper.ThrowFormatException(NumericType.Int16); 417ThrowHelper.ThrowFormatException(NumericType.Int32); 427ThrowHelper.ThrowFormatException(NumericType.Int32); 451ThrowHelper.ThrowFormatException(NumericType.Int64); 461ThrowHelper.ThrowFormatException(NumericType.Int64); 486ThrowHelper.ThrowFormatException(NumericType.UInt16); 496ThrowHelper.ThrowFormatException(NumericType.UInt16); 521ThrowHelper.ThrowFormatException(NumericType.UInt32); 531ThrowHelper.ThrowFormatException(NumericType.UInt32); 556ThrowHelper.ThrowFormatException(NumericType.UInt64); 566ThrowHelper.ThrowFormatException(NumericType.UInt64); 589ThrowHelper.ThrowFormatException(NumericType.Single); 610ThrowHelper.ThrowFormatException(NumericType.Single); 622ThrowHelper.ThrowFormatException(NumericType.Single); 646ThrowHelper.ThrowFormatException(NumericType.Double); 667ThrowHelper.ThrowFormatException(NumericType.Double); 679ThrowHelper.ThrowFormatException(NumericType.Double); 703ThrowHelper.ThrowFormatException(NumericType.Decimal); 713ThrowHelper.ThrowFormatException(NumericType.Decimal); 735ThrowHelper.ThrowFormatException(DataType.DateTime); 745ThrowHelper.ThrowFormatException(DataType.DateTime); 768ThrowHelper.ThrowFormatException(DataType.DateTimeOffset); 778ThrowHelper.ThrowFormatException(DataType.DateTimeOffset); 801ThrowHelper.ThrowFormatException(DataType.Guid); 811ThrowHelper.ThrowFormatException(DataType.Guid); 831ThrowHelper.ThrowInvalidOperationException_ExpectedString(TokenType); 859ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 895ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 930ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 965ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 1000ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 1036ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 1072ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 1108ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 1143ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 1173ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 1203ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(TokenType); 1238ThrowHelper.ThrowInvalidOperationException_ExpectedString(TokenType); 1303ThrowHelper.ThrowInvalidOperationException_ExpectedString(TokenType); 1369ThrowHelper.ThrowInvalidOperationException_ExpectedString(TokenType);
System\Text\Json\Schema\JsonSchemaExporter.cs (5)
31ThrowHelper.ThrowArgumentNullException(nameof(options)); 36ThrowHelper.ThrowArgumentNullException(nameof(type)); 54ThrowHelper.ThrowArgumentNullException(nameof(typeInfo)); 387ThrowHelper.ThrowNotSupportedException_JsonSchemaExporterDoesNotSupportReferenceHandlerPreserve(); 421ThrowHelper.ThrowInvalidOperationException_JsonSchemaExporterDepthTooLarge();
System\Text\Json\Serialization\ConfigurationList.cs (3)
39ThrowHelper.ThrowArgumentNullException(nameof(value)); 55ThrowHelper.ThrowArgumentNullException(nameof(item)); 95ThrowHelper.ThrowArgumentNullException(nameof(item));
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableOfTConverter.cs (2)
19ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state); 40ThrowHelper.ThrowNotSupportedException_TypeRequiresAsyncSerialization(Type);
System\Text\Json\Serialization\Converters\Collection\ICollectionOfTConverter.cs (1)
36ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state);
System\Text\Json\Serialization\Converters\Collection\IDictionaryConverter.cs (1)
38ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state);
System\Text\Json\Serialization\Converters\Collection\IDictionaryOfTKeyTValueConverter.cs (1)
38ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state);
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverter.cs (1)
30ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state);
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactoryHelpers.cs (2)
40ThrowHelper.ThrowNotSupportedException_SerializationNotSupported(type); 64ThrowHelper.ThrowNotSupportedException_SerializationNotSupported(type);
System\Text\Json\Serialization\Converters\Collection\IEnumerableOfTConverter.cs (1)
28ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state);
System\Text\Json\Serialization\Converters\Collection\IListConverter.cs (1)
35ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state);
System\Text\Json\Serialization\Converters\Collection\IListOfTConverter.cs (1)
36ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state);
System\Text\Json\Serialization\Converters\Collection\IReadOnlyDictionaryOfTKeyTValueConverter.cs (1)
26ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state);
System\Text\Json\Serialization\Converters\Collection\ISetOfTConverter.cs (1)
33ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state);
System\Text\Json\Serialization\Converters\Collection\JsonCollectionConverter.cs (5)
37ThrowHelper.ThrowNotSupportedException_DeserializeNoConstructor(typeInfo, ref reader, ref state); 77ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type); 132ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type); 139ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type); 276ThrowHelper.ThrowJsonException_MetadataInvalidPropertyInArrayMetadata(ref state, typeToConvert, reader);
System\Text\Json\Serialization\Converters\Collection\JsonDictionaryConverter.cs (4)
52ThrowHelper.ThrowNotSupportedException_DeserializeNoConstructor(typeInfo, ref reader, ref state); 89ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type); 159ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type); 263ThrowHelper.ThrowUnexpectedMetadataException(propertyName, ref reader, ref state);
System\Text\Json\Serialization\Converters\Collection\ListOfTConverter.cs (1)
30ThrowHelper.ThrowNotSupportedException_SerializationNotSupported(state.Current.JsonTypeInfo.Type);
System\Text\Json\Serialization\Converters\Collection\QueueOfTConverter.cs (1)
28ThrowHelper.ThrowNotSupportedException_SerializationNotSupported(state.Current.JsonTypeInfo.Type);
System\Text\Json\Serialization\Converters\Collection\StackOfTConverter.cs (1)
29ThrowHelper.ThrowNotSupportedException_SerializationNotSupported(state.Current.JsonTypeInfo.Type);
System\Text\Json\Serialization\Converters\Collection\StackOrQueueConverter.cs (1)
35ThrowHelper.ThrowNotSupportedException_CannotPopulateCollection(Type, ref reader, ref state);
System\Text\Json\Serialization\Converters\Node\JsonArrayConverter.cs (1)
33throw ThrowHelper.GetInvalidOperationException_ExpectedArray(reader.TokenType);
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (1)
58throw ThrowHelper.GetInvalidOperationException_ExpectedObject(reader.TokenType);
System\Text\Json\Serialization\Converters\Object\ObjectConverter.cs (5)
22ThrowHelper.ThrowNotSupportedException_DictionaryKeyTypeNotSupported(Type, this); 28ThrowHelper.ThrowNotSupportedException_DictionaryKeyTypeNotSupported(Type, this); 53ThrowHelper.ThrowArgumentNullException(nameof(value)); 59ThrowHelper.ThrowNotSupportedException_DictionaryKeyTypeNotSupported(runtimeType, this); 83ThrowHelper.ThrowNotSupportedException_NoMetadataForType(typeToConvert, _originatingResolver);
System\Text\Json\Serialization\Converters\Object\ObjectConverterFactory.cs (1)
49ThrowHelper.ThrowInvalidOperationException_SerializationDuplicateTypeAttribute<JsonConstructorAttribute>(typeToConvert);
System\Text\Json\Serialization\Converters\Object\ObjectDefaultConverter.cs (4)
32ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type); 43ThrowHelper.ThrowNotSupportedException_DeserializeNoConstructor(jsonTypeInfo, ref reader, ref state); 62ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type); 119ThrowHelper.ThrowNotSupportedException_DeserializeNoConstructor(jsonTypeInfo, ref reader, ref state);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (3)
45ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type); 125ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type); 581ThrowHelper.ThrowInvalidOperationException_ConstructorParameterIncompleteBinding(Type);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Large.cs (1)
27ThrowHelper.ThrowJsonException_ConstructorParameterDisallowNull(jsonParameterInfo.Name, state.Current.JsonTypeInfo.Type);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Small.cs (1)
80ThrowHelper.ThrowJsonException_ConstructorParameterDisallowNull(info.Name, state.Current.JsonTypeInfo.Type);
System\Text\Json\Serialization\Converters\Value\BooleanConverter.cs (1)
30ThrowHelper.ThrowFormatException(DataType.Boolean);
System\Text\Json\Serialization\Converters\Value\CharConverter.cs (3)
17ThrowHelper.ThrowInvalidOperationException_ExpectedString(reader.TokenType); 22ThrowHelper.ThrowInvalidOperationException_ExpectedChar(reader.TokenType); 30ThrowHelper.ThrowInvalidOperationException_ExpectedChar(reader.TokenType);
System\Text\Json\Serialization\Converters\Value\DateOnlyConverter.cs (3)
19ThrowHelper.ThrowInvalidOperationException_ExpectedString(reader.TokenType); 35ThrowHelper.ThrowFormatException(DataType.DateOnly); 52ThrowHelper.ThrowFormatException(DataType.DateOnly);
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (4)
128ThrowHelper.ThrowJsonException(); 168ThrowHelper.ThrowJsonException(); 188ThrowHelper.ThrowJsonException(); 581ThrowHelper.ThrowInvalidOperationException_UnsupportedEnumIdentifier(typeof(T), name);
System\Text\Json\Serialization\Converters\Value\HalfConverter.cs (3)
25ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(reader.TokenType); 58ThrowHelper.ThrowFormatException(NumericType.Half); 102ThrowHelper.ThrowFormatException(NumericType.Half);
System\Text\Json\Serialization\Converters\Value\Int128Converter.cs (2)
25ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(reader.TokenType); 48ThrowHelper.ThrowFormatException(NumericType.Int128);
System\Text\Json\Serialization\Converters\Value\JsonPrimitiveConverter.cs (2)
20ThrowHelper.ThrowArgumentNullException(nameof(value)); 30ThrowHelper.ThrowInvalidOperationException_ExpectedPropertyName(reader.TokenType);
System\Text\Json\Serialization\Converters\Value\StringConverter.cs (2)
40ThrowHelper.ThrowArgumentNullException(nameof(value)); 49ThrowHelper.ThrowInvalidOperationException_NamingPolicyReturnNull(options.DictionaryKeyPolicy);
System\Text\Json\Serialization\Converters\Value\TimeOnlyConverter.cs (4)
21ThrowHelper.ThrowInvalidOperationException_ExpectedString(reader.TokenType); 39ThrowHelper.ThrowFormatException(DataType.TimeOnly); 60ThrowHelper.ThrowFormatException(DataType.TimeOnly); 72ThrowHelper.ThrowFormatException(DataType.TimeOnly);
System\Text\Json\Serialization\Converters\Value\TimeSpanConverter.cs (4)
21ThrowHelper.ThrowInvalidOperationException_ExpectedString(reader.TokenType); 39ThrowHelper.ThrowFormatException(DataType.TimeSpan); 59ThrowHelper.ThrowFormatException(DataType.TimeSpan); 71ThrowHelper.ThrowFormatException(DataType.TimeSpan);
System\Text\Json\Serialization\Converters\Value\UInt128Converter.cs (2)
25ThrowHelper.ThrowInvalidOperationException_ExpectedNumber(reader.TokenType); 48ThrowHelper.ThrowFormatException(NumericType.UInt128);
System\Text\Json\Serialization\Converters\Value\UriConverter.cs (2)
40ThrowHelper.ThrowJsonException(); 50ThrowHelper.ThrowArgumentNullException(nameof(value));
System\Text\Json\Serialization\Converters\Value\VersionConverter.cs (5)
29ThrowHelper.ThrowInvalidOperationException_ExpectedString(reader.TokenType); 42ThrowHelper.ThrowFormatException(DataType.Version); 55ThrowHelper.ThrowFormatException(DataType.Version); 77ThrowHelper.ThrowJsonException(); 112ThrowHelper.ThrowArgumentNullException(nameof(value));
System\Text\Json\Serialization\JsonConverter.MetadataHandling.cs (2)
38ThrowHelper.ThrowNotSupportedException_DerivedConverterDoesNotSupportMetadata(resolvedType.Type); 104ThrowHelper.ThrowNotSupportedException_DerivedConverterDoesNotSupportMetadata(derivedJsonTypeInfo.Type);
System\Text\Json\Serialization\JsonConverterFactory.cs (2)
43ThrowHelper.ThrowInvalidOperationException_SerializerConverterFactoryReturnsNull(GetType()); 46ThrowHelper.ThrowInvalidOperationException_SerializerConverterFactoryReturnsJsonConverterFactorty(GetType());
System\Text\Json\Serialization\JsonConverterOfT.cs (16)
155ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type); 260ThrowHelper.ThrowJsonException_SerializationConverterRead(this); 331ThrowHelper.ThrowJsonException_SerializerCycleDetected(options.EffectiveMaxDepth); 467ThrowHelper.ThrowJsonException_SerializerCycleDetected(options.EffectiveMaxDepth); 508ThrowHelper.ThrowJsonException_SerializationConverterRead(this); 512ThrowHelper.ThrowJsonException_SerializationConverterRead(this); 520ThrowHelper.ThrowJsonException_SerializationConverterRead(this); 524ThrowHelper.ThrowJsonException_SerializationConverterRead(this); 539ThrowHelper.ThrowJsonException_SerializationConverterRead(this); 548ThrowHelper.ThrowJsonException_SerializationConverterRead(this); 562ThrowHelper.ThrowJsonException_SerializationConverterWrite(this); 597ThrowHelper.ThrowNotSupportedException_DictionaryKeyTypeNotSupported(Type, this); 611ThrowHelper.ThrowJsonException_SerializationConverterRead(this); 630ThrowHelper.ThrowNotSupportedException_DictionaryKeyTypeNotSupported(Type, this); 640ThrowHelper.ThrowArgumentNullException(nameof(value)); 656ThrowHelper.ThrowJsonException_SerializationConverterWrite(this);
System\Text\Json\Serialization\JsonConverterOfT.ReadCore.cs (7)
63ThrowHelper.ReThrowWithPath(ref state, jsonReaderEx); 66case FormatException when ex.Source == ThrowHelper.ExceptionSourceValueToRethrowAsJsonException: 67ThrowHelper.ReThrowWithPath(ref state, reader, ex); 70case InvalidOperationException when ex.Source == ThrowHelper.ExceptionSourceValueToRethrowAsJsonException: 71ThrowHelper.ReThrowWithPath(ref state, reader, ex); 79ThrowHelper.AddJsonExceptionInformation(ref state, reader, jsonEx); 85ThrowHelper.ThrowNotSupportedException(ref state, reader, ex);
System\Text\Json\Serialization\JsonConverterOfT.WriteCore.cs (4)
29case InvalidOperationException when ex.Source == ThrowHelper.ExceptionSourceValueToRethrowAsJsonException: 30ThrowHelper.ReThrowWithPath(ref state, ex); 38ThrowHelper.AddJsonExceptionInformation(ref state, jsonException); 44ThrowHelper.ThrowNotSupportedException(ref state, ex);
System\Text\Json\Serialization\JsonNumberEnumConverter.cs (1)
33ThrowHelper.ThrowArgumentOutOfRangeException_JsonConverterFactory_TypeNotSupported(typeToConvert);
System\Text\Json\Serialization\JsonResumableConverterOfT.cs (2)
21ThrowHelper.ThrowArgumentNullException(nameof(options)); 38ThrowHelper.ThrowArgumentNullException(nameof(options));
System\Text\Json\Serialization\JsonSerializer.Helpers.cs (6)
61ThrowHelper.ThrowInvalidOperationException_NoMetadataForType(inputType, context); 72ThrowHelper.ThrowArgumentNullException(nameof(inputType)); 80ThrowHelper.ThrowArgumentException_DeserializeWrongType(inputType, value); 125ThrowHelper.ThrowInvalidOperationException_DeserializeUnableToAssignNull(declaredType: typeof(T)); 129ThrowHelper.ThrowInvalidCastException_DeserializeUnableToAssignValue(typeOfValue: value.GetType(), declaredType: typeof(T)); 140ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(typeof(T));
System\Text\Json\Serialization\JsonSerializer.Read.Document.cs (10)
35ThrowHelper.ThrowArgumentNullException(nameof(document)); 66ThrowHelper.ThrowArgumentNullException(nameof(document)); 70ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 99ThrowHelper.ThrowArgumentNullException(nameof(document)); 103ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 128ThrowHelper.ThrowArgumentNullException(nameof(document)); 132ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 180ThrowHelper.ThrowArgumentNullException(nameof(document)); 184ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 188ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Read.Element.cs (5)
58ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 87ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 108ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 152ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 156ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (35)
79ThrowHelper.ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties(reader.GetUnescapedSpan(), ref state); 91ThrowHelper.ThrowJsonException_MetadataUnexpectedProperty(propertyName, ref state); 96ThrowHelper.ThrowJsonException_MetadataIdCannotBeCombinedWithRef(propertyName, ref state); 101ThrowHelper.ThrowJsonException_MetadataCannotParsePreservedObjectIntoImmutable(converter.Type!); 112ThrowHelper.ThrowJsonException_MetadataUnexpectedProperty(propertyName, ref state); 117ThrowHelper.ThrowJsonException_MetadataInvalidReferenceToValueType(converter.Type!); 122ThrowHelper.ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties(reader.GetUnescapedSpan(), ref state); 133ThrowHelper.ThrowJsonException_MetadataUnexpectedProperty(propertyName, ref state); 138ThrowHelper.ThrowJsonException_DuplicateMetadataProperty(state.Current.JsonPropertyName); 149ThrowHelper.ThrowJsonException_DuplicateMetadataProperty(s_valuesPropertyName); 155ThrowHelper.ThrowJsonException_MetadataInvalidPropertyInArrayMetadata(ref state, jsonTypeInfo.Type, reader); 176ThrowHelper.ThrowJsonException_MetadataInvalidPropertyInArrayMetadata(ref state, jsonTypeInfo.Type, reader); 182ThrowHelper.ThrowUnexpectedMetadataException(propertyName, ref reader, ref state); 216ThrowHelper.ThrowJsonException_MetadataValueWasNotString(reader.TokenType); 221ThrowHelper.ThrowNotSupportedException_ObjectWithParameterizedCtorRefMetadataNotSupported(s_refPropertyName, ref reader, ref state); 230ThrowHelper.ThrowJsonException_MetadataValueWasNotString(reader.TokenType); 235ThrowHelper.ThrowNotSupportedException_ObjectWithParameterizedCtorRefMetadataNotSupported(s_refPropertyName, ref reader, ref state); 253ThrowHelper.ThrowJsonException_MetadataValueWasNotString(reader.TokenType); 263ThrowHelper.ThrowJsonException_MetadataValuesInvalidToken(reader.TokenType); 301ThrowHelper.ThrowJsonException_MetadataStandaloneValuesProperty(ref state, s_valuesPropertyName); 367ThrowHelper.ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties(); 373ThrowHelper.ThrowNotSupportedException_ObjectWithParameterizedCtorRefMetadataNotSupported(s_refPropertyName, ref reader, ref state); 378ThrowHelper.ThrowJsonException_MetadataValueWasNotString(property.Value.ValueKind); 390ThrowHelper.ThrowNotSupportedException_ObjectWithParameterizedCtorRefMetadataNotSupported(s_refPropertyName, ref reader, ref state); 396ThrowHelper.ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties(); 401ThrowHelper.ThrowJsonException_MetadataValueWasNotString(property.Value.ValueKind); 431ThrowHelper.ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties(); 437ThrowHelper.ThrowNotSupportedException_ObjectWithParameterizedCtorRefMetadataNotSupported(s_refPropertyName, ref reader, ref state); 449ThrowHelper.ThrowNotSupportedException_ObjectWithParameterizedCtorRefMetadataNotSupported(s_refPropertyName, ref reader, ref state); 455ThrowHelper.ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties(); 474ThrowHelper.ThrowJsonException_MetadataValueWasNotString(metadataValueKind); 488ThrowHelper.ThrowJsonException_MetadataUnexpectedProperty(s_valuesPropertyName, ref state); 504ThrowHelper.ThrowJsonException_MetadataPreservedArrayValuesNotFound(ref state, converter.Type!); 511ThrowHelper.ThrowJsonException_MetadataInvalidPropertyInArrayMetadata(ref state, converter.Type!, reader); 531ThrowHelper.ThrowInvalidOperationException_MetadataReferenceOfTypeCannotBeAssignedToType(
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (4)
48ThrowHelper.ThrowJsonException_UnmappedJsonProperty(jsonTypeInfo.Type, stringPropertyName); 97ThrowHelper.ThrowUnexpectedMetadataException(propertyName, ref reader, ref state); 137ThrowHelper.ThrowInvalidOperationException_NodeJsonObjectCustomConverterNotAllowedOnExtensionProperty(); 141ThrowHelper.ThrowNotSupportedException_SerializationNotSupported(jsonPropertyInfo.PropertyType);
System\Text\Json\Serialization\JsonSerializer.Read.Node.cs (5)
56ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 80ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 100ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 143ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 147ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Read.Span.cs (5)
62ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 85ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 106ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 140ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 144ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Read.Stream.cs (23)
51ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 86ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 126ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 130ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 166ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 170ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 203ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 207ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 238ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 242ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 271ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 275ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 302ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 306ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 348ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 352ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 356ThrowHelper.ThrowArgumentNullException(nameof(context)); 394ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 398ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 402ThrowHelper.ThrowArgumentNullException(nameof(context)); 460ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 514ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 519ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo));
System\Text\Json\Serialization\JsonSerializer.Read.String.cs (15)
51ThrowHelper.ThrowArgumentNullException(nameof(json)); 123ThrowHelper.ThrowArgumentNullException(nameof(json)); 127ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 167ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 207ThrowHelper.ThrowArgumentNullException(nameof(json)); 211ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 249ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 282ThrowHelper.ThrowArgumentNullException(nameof(json)); 286ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 315ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 361ThrowHelper.ThrowArgumentNullException(nameof(json)); 365ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 369ThrowHelper.ThrowArgumentNullException(nameof(context)); 415ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 419ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (11)
116ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 166ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 215ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 275ThrowHelper.ThrowArgumentNullException(nameof(returnType)); 279ThrowHelper.ThrowArgumentNullException(nameof(context)); 291ThrowHelper.ThrowArgumentException_SerializerDoesNotSupportComments(nameof(reader)); 316ThrowHelper.ThrowArgumentException_SerializerDoesNotSupportComments(nameof(reader)); 357ThrowHelper.ThrowJsonReaderException(ref reader, ExceptionResource.ExpectedOneCompleteToken); 372ThrowHelper.ThrowJsonReaderException(ref reader, ExceptionResource.NotEnoughData); 454ThrowHelper.ThrowJsonReaderException( 465ThrowHelper.ReThrowWithPath(ref state, ex);
System\Text\Json\Serialization\JsonSerializer.Write.ByteArray.cs (3)
75ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 98ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 130ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Write.Document.cs (3)
72ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 95ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 124ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Write.Element.cs (3)
72ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 95ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 124ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Write.Node.cs (3)
73ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 96ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 125ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Write.Pipe.cs (8)
35ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 39ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 72ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 101ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 106ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 141ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 146ThrowHelper.ThrowArgumentNullException(nameof(context)); 185ThrowHelper.ThrowArgumentNullException(nameof(utf8Json));
System\Text\Json\Serialization\JsonSerializer.Write.Stream.cs (16)
49ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 79ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 116ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 151ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 179ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 183ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 207ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 211ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 240ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 244ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 270ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 274ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 309ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 313ThrowHelper.ThrowArgumentNullException(nameof(context)); 346ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 350ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Write.String.cs (3)
87ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 114ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 147ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializer.Write.Utf8JsonWriter.cs (8)
35ThrowHelper.ThrowArgumentNullException(nameof(writer)); 69ThrowHelper.ThrowArgumentNullException(nameof(writer)); 91ThrowHelper.ThrowArgumentNullException(nameof(writer)); 95ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 118ThrowHelper.ThrowArgumentNullException(nameof(writer)); 122ThrowHelper.ThrowArgumentNullException(nameof(jsonTypeInfo)); 154ThrowHelper.ThrowArgumentNullException(nameof(writer)); 158ThrowHelper.ThrowArgumentNullException(nameof(context));
System\Text\Json\Serialization\JsonSerializerContext.cs (1)
114ThrowHelper.ThrowInvalidOperationException_ResolverTypeInfoOptionsNotCompatible();
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (6)
59ThrowHelper.ThrowArgumentNullException(nameof(type)); 64ThrowHelper.ThrowArgumentException_CannotSerializeInvalidType(nameof(type), type, null, null); 87ThrowHelper.ThrowArgumentNullException(nameof(type)); 92ThrowHelper.ThrowArgumentException_CannotSerializeInvalidType(nameof(type), type, null, null); 132ThrowHelper.ThrowNotSupportedException_NoMetadataForType(type, TypeInfoResolver); 349NotSupportedException nse = ThrowHelper.GetNotSupportedException_AmbiguousMetadataForType(type, candidateType, interfaceType);
System\Text\Json\Serialization\JsonSerializerOptions.Converters.cs (2)
45ThrowHelper.ThrowArgumentNullException(nameof(typeToConvert)); 110ThrowHelper.ThrowInvalidOperationException_ConverterCanConvertMultipleTypes(propertyType, converter);
System\Text\Json\Serialization\JsonSerializerOptions.cs (8)
120ThrowHelper.ThrowArgumentNullException(nameof(options)); 574ThrowHelper.ThrowArgumentOutOfRangeException_MaxDepthMustBePositive(nameof(value)); 881ThrowHelper.ThrowInvalidOperationException_JsonSerializerOptionsNoTypeInfoResolverSpecified(); 964ThrowHelper.ThrowInvalidOperationException_JsonSerializerIsReflectionDisabled(); 998ThrowHelper.ThrowInvalidOperationException_ResolverTypeNotCompatible(type, info.Type); 1003ThrowHelper.ThrowInvalidOperationException_ResolverTypeInfoOptionsNotCompatible(); 1070ThrowHelper.ThrowInvalidOperationException_SerializerOptionsReadOnly(_typeInfoResolver as JsonSerializerContext); 1105ThrowHelper.ThrowInvalidOperationException_InvalidChainedResolver();
System\Text\Json\Serialization\JsonStringEnumConverter.cs (2)
57ThrowHelper.ThrowArgumentOutOfRangeException_JsonConverterFactory_TypeNotSupported(typeToConvert); 116ThrowHelper.ThrowArgumentOutOfRangeException_JsonConverterFactory_TypeNotSupported(typeToConvert);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (4)
166ThrowHelper.ThrowInvalidOperationException_SerializationConverterNotCompatible(converter.GetType(), typeToConvert); 187ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeNotCompatible(declaringType, memberInfo, typeToConvert); 195ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeInvalid(declaringType, memberInfo); 216ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeNotCompatible(declaringType, memberInfo, typeToConvert);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.cs (3)
55ThrowHelper.ThrowArgumentNullException(nameof(type)); 60ThrowHelper.ThrowArgumentNullException(nameof(options)); 117ThrowHelper.ThrowInvalidOperationException_DefaultTypeInfoResolverImmutable();
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (3)
238ThrowHelper.ThrowInvalidOperationException_CannotSerializeInvalidType(typeToConvert, memberInfo.DeclaringType, memberInfo); 301ThrowHelper.ThrowNotSupportedException_ConstructorContainsNullParameterNames(typeInfo.Converter.ConstructorInfo.DeclaringType); 395ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameNull(propertyInfo);
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (1)
234ThrowHelper.ThrowMissingMemberException_MissingFSharpCoreMember(memberName);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Collections.cs (3)
89ThrowHelper.ThrowArgumentNullException(nameof(createRangeFunc)); 157ThrowHelper.ThrowArgumentNullException(nameof(createRangeFunc)); 407ThrowHelper.ThrowArgumentNullException(nameof(addFunc));
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (3)
287ThrowHelper.ThrowArgumentNullException(nameof(options)); 304ThrowHelper.ThrowArgumentNullException(nameof(underlyingTypeInfo)); 323ThrowHelper.ThrowArgumentNullException(nameof(options));
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (6)
27ThrowHelper.ThrowArgumentNullException(nameof(options)); 31ThrowHelper.ThrowArgumentNullException(nameof(propertyInfo)); 67ThrowHelper.ThrowArgumentNullException(nameof(options)); 71ThrowHelper.ThrowArgumentNullException(nameof(objectInfo)); 87ThrowHelper.ThrowArgumentNullException(nameof(options)); 91ThrowHelper.ThrowArgumentNullException(nameof(converter));
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (3)
80ThrowHelper.ThrowArgumentNullException(nameof(collectionInfo)); 155ThrowHelper.ThrowInvalidOperationException_JsonIncludeOnInaccessibleProperty(jsonPropertyInfo.MemberName, jsonPropertyInfo.DeclaringType); 228ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameNull(propertyInfo);
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (17)
255ThrowHelper.ThrowInvalidOperationException_PropertyTypeNotNullable(this); 294ThrowHelper.ThrowInvalidOperationException_PropertyTypeNotNullable(this); 326ThrowHelper.ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid(this); 455ThrowHelper.ThrowInvalidOperationException_JsonPropertyRequiredAndNotDeserializable(this); 460ThrowHelper.ThrowInvalidOperationException_JsonPropertyRequiredAndExtensionData(this); 487ThrowHelper.ThrowInvalidOperationException_PropertyConflictsWithMetadataPropertyName(DeclaringType, Name); 572ThrowHelper.ThrowInvalidOperationException_NumberHandlingOnPropertyInvalid(this); 614ThrowHelper.ThrowInvalidOperationException_NumberHandlingOnPropertyInvalid(this); 649ThrowHelper.ThrowInvalidOperationException_ObjectCreationHandlingPopulateNotSupportedByConverter(this); 654ThrowHelper.ThrowInvalidOperationException_ObjectCreationHandlingPropertyMustHaveAGetter(this); 659ThrowHelper.ThrowInvalidOperationException_ObjectCreationHandlingPropertyValueTypeMustHaveASetter(this); 666ThrowHelper.ThrowInvalidOperationException_ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization(this); 671ThrowHelper.ThrowInvalidOperationException_ObjectCreationHandlingPropertyCannotAllowReadOnlyMember(this); 681ThrowHelper.ThrowNotSupportedException_ObjectCreationHandlingPropertyDoesNotSupportParameterizedConstructors(); 686ThrowHelper.ThrowInvalidOperationException_ObjectCreationHandlingPropertyCannotAllowReferenceHandling(); 802ThrowHelper.ThrowArgumentNullException(nameof(value)); 932ThrowHelper.ThrowInvalidOperationException_JsonPropertyInfoIsBoundToDifferentJsonTypeInfo(this);
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (9)
214ThrowHelper.ThrowJsonException_PropertyGetterDisallowNull(Name, state.Current.JsonTypeInfo.Type); 229ThrowHelper.ThrowJsonException_SerializationConverterWrite(EffectiveConverter); 288ThrowHelper.ThrowInvalidOperationException_DeserializeUnableToAssignNull(EffectiveConverter.Type); 291ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(EffectiveConverter.Type); 298ThrowHelper.ThrowJsonException_PropertySetterDisallowNull(Name, state.Current.JsonTypeInfo.Type); 321ThrowHelper.ThrowJsonException_PropertySetterDisallowNull(Name, state.Current.JsonTypeInfo.Type); 350ThrowHelper.ThrowJsonException_PropertySetterDisallowNull(Name, state.Current.JsonTypeInfo.Type); 373ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(EffectiveConverter.Type); 423ThrowHelper.ThrowInvalidOperationException_IgnoreConditionOnValueTypeInvalid(MemberName!, DeclaringType);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (18)
128ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 158ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 188ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 194ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOnDeserializingCallbacksNotSupported(Type); 224ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 315ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 320ThrowHelper.ThrowArgumentException_JsonPolymorphismOptionsAssociatedWithDifferentJsonTypeInfo(nameof(value)); 376ThrowHelper.ThrowInvalidOperationException_NoMetadataForTypeProperties(Options.TypeInfoResolver, Type); 543ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 587ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 674ThrowHelper.ThrowInvalidOperationException_TypeInfoImmutable(); 911ThrowHelper.ThrowArgumentNullException(nameof(options)); 942ThrowHelper.ThrowArgumentNullException(nameof(type)); 947ThrowHelper.ThrowArgumentNullException(nameof(options)); 952ThrowHelper.ThrowArgumentException_CannotSerializeInvalidType(nameof(type), type, null, null); 998ThrowHelper.ThrowArgumentNullException(nameof(propertyType)); 1003ThrowHelper.ThrowArgumentNullException(nameof(name)); 1008ThrowHelper.ThrowArgumentException_CannotSerializeInvalidType(nameof(propertyType), propertyType, Type, name);
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (2)
68ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 75ThrowHelper.ThrowInvalidOperationException_CreateObjectConverterNotCompatible(Type);
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.WriteHelpers.cs (3)
123ThrowHelper.ThrowOperationCanceledException_PipeWriteCanceled(); 156ThrowHelper.ThrowInvalidOperationException_PipeWriterDoesNotImplementUnflushedBytes(pipeWriter); 187ThrowHelper.ThrowOperationCanceledException_PipeWriteCanceled();
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolver.cs (3)
30ThrowHelper.ThrowArgumentNullException(nameof(resolvers)); 75ThrowHelper.ThrowArgumentNullException(nameof(resolver)); 79ThrowHelper.ThrowArgumentNullException(nameof(modifier));
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolverChain.cs (1)
11=> ThrowHelper.ThrowInvalidOperationException_TypeInfoResolverChainImmutable();
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (11)
31ThrowHelper.ThrowInvalidOperationException_TypeDoesNotSupportPolymorphism(BaseType); 42ThrowHelper.ThrowInvalidOperationException_DerivedTypeNotSupported(BaseType, derivedType); 50ThrowHelper.ThrowInvalidOperationException_DerivedTypeIsAlreadySpecified(BaseType, derivedType); 57ThrowHelper.ThrowInvalidOperationException_TypeDicriminatorIdIsAlreadySpecified(BaseType, typeDiscriminator); 68ThrowHelper.ThrowInvalidOperationException_PolymorphicTypeConfigurationDoesNotSpecifyDerivedTypes(BaseType); 77ThrowHelper.ThrowNotSupportedException_BaseConverterDoesNotSupportMetadata(BaseType); 88ThrowHelper.ThrowInvalidOperationException_InvalidCustomTypeDiscriminatorPropertyName(); 104ThrowHelper.ThrowInvalidOperationException_PropertyConflictsWithMetadataPropertyName(derivedTypeInfo.JsonTypeInfo.Type, propertyName); 143ThrowHelper.ThrowNotSupportedException_RuntimeTypeNotSupported(BaseType, runtimeType); 178ThrowHelper.ThrowJsonException_UnrecognizedTypeDiscriminator(typeDiscriminator); 239ThrowHelper.ThrowNotSupportedException_RuntimeTypeDiamondAmbiguity(BaseType, type, result.JsonTypeInfo.Type, interfaceResult.JsonTypeInfo.Type);
System\Text\Json\Serialization\PreserveReferenceResolver.cs (2)
37ThrowHelper.ThrowJsonException_MetadataDuplicateIdFound(referenceId); 66ThrowHelper.ThrowJsonException_MetadataReferenceNotFound(referenceId);
System\Text\Json\Serialization\ReadStackFrame.cs (1)
160ThrowHelper.ThrowJsonException_JsonRequiredPropertyMissing(typeInfo, RequiredPropertiesSet);
System\Text\Json\Writer\JsonWriterHelper.cs (18)
43ThrowHelper.ThrowArgumentNullException(nameof(value)); 46ThrowHelper.ThrowArgumentOutOfRangeException_NewLine(nameof(value)); 53ThrowHelper.ThrowArgumentOutOfRangeException_IndentCharacter(nameof(value)); 60ThrowHelper.ThrowArgumentOutOfRangeException_IndentSize(nameof(value), JsonConstants.MinimumIndentSize, JsonConstants.MaximumIndentSize); 67ThrowHelper.ThrowArgumentException_PropertyNameTooLarge(propertyName.Length); 74ThrowHelper.ThrowArgumentException_ValueTooLarge(value.Length); 82ThrowHelper.ThrowArgumentException_ValueNotSupported(); 91ThrowHelper.ThrowArgumentException_ValueNotSupported(); 99ThrowHelper.ThrowArgumentException_PropertyNameTooLarge(propertyName.Length); 106ThrowHelper.ThrowArgumentException_ValueTooLarge(value.Length); 113ThrowHelper.ThrowArgumentException(propertyName, value); 120ThrowHelper.ThrowArgumentException(propertyName, value); 127ThrowHelper.ThrowArgumentException(propertyName, value); 134ThrowHelper.ThrowArgumentException(propertyName, value); 141ThrowHelper.ThrowPropertyNameTooLargeArgumentException(propertyName.Length); 148ThrowHelper.ThrowPropertyNameTooLargeArgumentException(propertyName.Length); 234SR.Format(SR.ExpectedEndOfDigitNotFound, ThrowHelper.GetPrintableString(val)), 251SR.Format(SR.ExpectedEndOfDigitNotFound, ThrowHelper.GetPrintableString(utf8FormattedNumber[i])),
System\Text\Json\Writer\JsonWriterHelper.Escaping.cs (2)
93ThrowHelper.ThrowArgumentException_InvalidUTF8(value.Slice(encoderBytesWritten)); 204ThrowHelper.ThrowArgumentException_InvalidUTF16(value[encoderCharsWritten]);
System\Text\Json\Writer\JsonWriterOptions.cs (1)
106ThrowHelper.ThrowArgumentOutOfRangeException_MaxDepthMustBePositive(nameof(value));
System\Text\Json\Writer\Utf8JsonWriter.cs (13)
115ThrowHelper.ThrowArgumentNullException(nameof(bufferWriter)); 136ThrowHelper.ThrowArgumentNullException(nameof(utf8Json)); 283ThrowHelper.ThrowObjectDisposedException_Utf8JsonWriter(); 483ThrowHelper.ThrowInvalidOperationException(ExceptionResource.DepthTooLarge, _currentDepth, _options.MaxDepth, token: default, tokenType: default); 542ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotStartObjectArrayWithoutProperty, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType); 553ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotStartObjectArrayAfterPrimitiveOrClose, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType); 752ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 778ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 963ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType); 970ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType); 979ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType); 1096ThrowHelper.ThrowInvalidOperationException_NeedLargerSpan(); 1121ThrowHelper.ThrowInvalidOperationException_NeedLargerSpan();
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (1)
52ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (1)
57ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (1)
56ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (1)
56ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (1)
58ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (1)
58ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (1)
56ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Helpers.cs (5)
17ThrowHelper.ThrowInvalidOperationOrArgumentException(propertyName, _currentDepth, _options.MaxDepth); 24ThrowHelper.ThrowInvalidOperationOrArgumentException(utf8PropertyName, _currentDepth, _options.MaxDepth); 31ThrowHelper.ThrowInvalidOperationException(_currentDepth, _options.MaxDepth); 42ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotWritePropertyWithinArray, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType); 55ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotWritePropertyWithinArray, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (2)
78ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 176ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (2)
56ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 147ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (5)
74ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 460ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 492ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 646ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 736ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (2)
58ThrowHelper.ThrowArgumentNullException(nameof(propertyName)); 153ThrowHelper.ThrowArgumentNullException(nameof(propertyName));
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (2)
58ThrowHelper.ThrowArgumentException_ValueTooLarge(bytes.Length); 101ThrowHelper.ThrowArgumentException_ValueTooLarge(bytes.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Comment.cs (6)
31ThrowHelper.ThrowArgumentNullException(nameof(value)); 52ThrowHelper.ThrowArgumentException_InvalidCommentValue(); 96ThrowHelper.ThrowArgumentException_InvalidUTF16(value[written]); 137ThrowHelper.ThrowArgumentException_InvalidUTF16(value[written]); 162ThrowHelper.ThrowArgumentException_InvalidCommentValue(); 167ThrowHelper.ThrowArgumentException_InvalidUTF8(utf8Value);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Helpers.cs (2)
22ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotWriteValueWithinObject, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType); 32ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotWriteValueAfterPrimitiveOrClose, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (5)
110ThrowHelper.ThrowArgumentException_ValueTooLarge(int.MaxValue); 148ThrowHelper.ThrowArgumentException(SR.ExpectedJsonTokens); 152ThrowHelper.ThrowArgumentException_ValueTooLarge(utf8JsonLen); 200ThrowHelper.ThrowArgumentException_ValueTooLarge(json.Length); 237ThrowHelper.ThrowArgumentException(SR.ExpectedJsonTokens);