449 references to SR
System.Text.Json (449)
System\Text\Json\Document\JsonDocument.cs (1)
1140throw new ArgumentException(SR.JsonDocumentDoesNotSupportComments, paramName);
System\Text\Json\Document\JsonDocumentOptions.cs (1)
34throw new ArgumentOutOfRangeException(nameof(value), SR.JsonDocumentDoesNotSupportComments);
System\Text\Json\Document\JsonElement.cs (6)
143throw new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, propertyName)); 181throw new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, propertyName.ToString())); 221throw new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, Encoding.UTF8.GetString(utf8PropertyName)));
System\Text\Json\Nodes\JsonArray.cs (2)
199_ => throw new InvalidOperationException(SR.Format(SR.NodeElementWrongType, nameof(JsonValueKind.Array))),
System\Text\Json\Nodes\JsonNode.cs (2)
200throw new InvalidOperationException(SR.Format(SR.NodeWrongType, nameof(JsonValue)));
System\Text\Json\Nodes\JsonObject.cs (2)
65_ => throw new InvalidOperationException(SR.Format(SR.NodeElementWrongType, nameof(JsonValueKind.Object)))
System\Text\Json\Serialization\Converters\FSharp\FSharpTypeConverterFactory.cs (1)
69return UnsupportedTypeConverterFactory.CreateUnsupportedConverterForType(typeToConvert, SR.FSharpDiscriminatedUnionsNotSupported);
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverter.cs (2)
15public string ErrorMessage => _errorMessage ?? SR.Format(SR.SerializeTypeInstanceNotSupported, typeof(T).FullName);
System\Text\Json\Serialization\JsonSerializerOptions.cs (5)
340throw new ArgumentException(SR.SerializationInvalidBufferSize); 406throw new InvalidOperationException(SR.DefaultIgnoreConditionAlreadySpecified); 436throw new ArgumentException(SR.DefaultIgnoreConditionInvalid); 441throw new InvalidOperationException(SR.DefaultIgnoreConditionAlreadySpecified); 659throw new ArgumentOutOfRangeException(nameof(value), SR.JsonSerializerDoesNotSupportComments);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
112ThrowHelper.ThrowInvalidOperationException(SR.DefaultIgnoreConditionInvalid);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (2)
327throw new InvalidOperationException(SR.Format(SR.SerializationConverterNotCompatible, typedConverter, typeof(T)));
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (2)
42throw new InvalidOperationException(SR.Format(SR.FieldCannotBeVirtual, nameof(propertyInfo.IsProperty), nameof(propertyInfo.IsVirtual)));
System\Text\Json\ThrowHelper.cs (168)
19throw GetArgumentOutOfRangeException(parameterName, SR.InvalidNewLine); 25throw GetArgumentOutOfRangeException(parameterName, SR.InvalidIndentCharacter); 31throw GetArgumentOutOfRangeException(parameterName, SR.Format(SR.InvalidIndentSize, minimumSize, maximumSize)); 37throw GetArgumentOutOfRangeException(parameterName, SR.MaxDepthMustBePositive); 43throw GetArgumentOutOfRangeException(parameterName, SR.JsonNumberExponentTooLarge); 54throw GetArgumentOutOfRangeException(parameterName, SR.CommentHandlingMustBeValid); 60throw new ArgumentOutOfRangeException(paramName, SR.ArrayIndexNegative); 66throw new ArgumentOutOfRangeException(nameof(typeToConvert), SR.Format(SR.SerializerConverterFactoryInvalidArgument, typeToConvert.FullName)); 72throw new ArgumentOutOfRangeException(paramName, SR.ArgumentOutOfRange_Generic_MustBeNonNegative); 78throw new ArgumentException(SR.Argument_InvalidOffLen); 84throw new ArgumentException(SR.ArrayTooSmall, paramName); 100return GetInvalidOperationException(SR.Format(SR.CallFlushToAvoidDataLoss, _buffered)); 106throw GetArgumentException(SR.DestinationTooShort); 112throw GetArgumentException(SR.Format(SR.PropertyNameTooLarge, tokenLength)); 118throw GetArgumentException(SR.Format(SR.ValueTooLarge, tokenLength)); 124throw GetArgumentException(SR.SpecialNumberValuesNotSupported); 130throw GetInvalidOperationException(SR.FailedToGetLargerSpan); 136throw GetArgumentException(SR.Format(SR.PropertyNameTooLarge, length)); 144ThrowArgumentException(SR.Format(SR.PropertyNameTooLarge, propertyName.Length)); 149ThrowArgumentException(SR.Format(SR.ValueTooLarge, value.Length)); 158ThrowArgumentException(SR.Format(SR.PropertyNameTooLarge, propertyName.Length)); 163ThrowArgumentException(SR.Format(SR.ValueTooLarge, value.Length)); 172ThrowArgumentException(SR.Format(SR.PropertyNameTooLarge, propertyName.Length)); 177ThrowArgumentException(SR.Format(SR.ValueTooLarge, value.Length)); 186ThrowArgumentException(SR.Format(SR.PropertyNameTooLarge, propertyName.Length)); 191ThrowArgumentException(SR.Format(SR.ValueTooLarge, value.Length)); 201ThrowInvalidOperationException(SR.Format(SR.DepthTooLarge, currentDepth, maxDepth)); 206ThrowArgumentException(SR.Format(SR.PropertyNameTooLarge, propertyName.Length)); 215ThrowInvalidOperationException(SR.Format(SR.DepthTooLarge, currentDepth, maxDepth)); 240return GetInvalidOperationException(SR.ZeroDepthAtEnd); 244return GetInvalidOperationException(SR.EmptyJsonIsInvalid); 254ThrowInvalidOperationException(SR.Format(SR.DepthTooLarge, currentDepth, maxDepth)); 259ThrowArgumentException(SR.Format(SR.PropertyNameTooLarge, propertyName.Length)); 312throw GetInvalidOperationException(SR.CannotSkip); 319throw GetInvalidOperationException(SR.Format(SR.CannotMixEncodings, GetEncodingName(previousEncoding), GetEncodingName(currentEncoding))); 337return GetInvalidOperationException(SR.Format(SR.InvalidCast, tokenType, message)); 342return GetInvalidOperationException(SR.Format(SR.InvalidComparison, tokenType)); 358SR.Format(SR.JsonElementHasWrongType, expectedType, actualType)); 366SR.Format(SR.JsonElementHasWrongType, expectedTypeName, actualType)); 405message = SR.Format(SR.ArrayDepthTooLarge, json.CurrentState.Options.MaxDepth); 408message = SR.Format(SR.MismatchedObjectArray, character); 411message = SR.TrailingCommaNotAllowedBeforeArrayEnd; 414message = SR.TrailingCommaNotAllowedBeforeObjectEnd; 417message = SR.EndOfStringNotFound; 420message = SR.Format(SR.RequiredDigitNotFoundAfterSign, character); 423message = SR.Format(SR.RequiredDigitNotFoundAfterDecimal, character); 426message = SR.RequiredDigitNotFoundEndOfData; 429message = SR.Format(SR.ExpectedEndAfterSingleJson, character); 432message = SR.Format(SR.ExpectedEndOfDigitNotFound, character); 435message = SR.Format(SR.ExpectedNextDigitEValueNotFound, character); 438message = SR.Format(SR.ExpectedSeparatorAfterPropertyNameNotFound, character); 441message = SR.Format(SR.ExpectedStartOfPropertyNotFound, character); 444message = SR.ExpectedStartOfPropertyOrValueNotFound; 447message = SR.Format(SR.ExpectedStartOfPropertyOrValueAfterComment, character); 450message = SR.Format(SR.ExpectedStartOfValueNotFound, character); 453message = SR.ExpectedValueAfterPropertyNameNotFound; 456message = SR.Format(SR.FoundInvalidCharacter, character); 459message = SR.Format(SR.InvalidEndOfJsonNonPrimitive, json.TokenType); 462message = SR.Format(SR.ObjectDepthTooLarge, json.CurrentState.Options.MaxDepth); 465message = SR.Format(SR.ExpectedFalse, characters); 468message = SR.Format(SR.ExpectedNull, characters); 471message = SR.Format(SR.ExpectedTrue, characters); 474message = SR.Format(SR.InvalidCharacterWithinString, character); 477message = SR.Format(SR.InvalidCharacterAfterEscapeWithinString, character); 480message = SR.Format(SR.InvalidHexCharacterWithinString, character); 483message = SR.EndOfCommentNotFound; 486message = SR.ZeroDepthAtEnd; 489message = SR.ExpectedJsonTokens; 492message = SR.NotEnoughData; 495message = SR.ExpectedOneCompleteToken; 498message = SR.Format(SR.InvalidCharacterAtStartOfComment, character); 501message = SR.UnexpectedEndOfDataWhileReadingComment; 504message = SR.UnexpectedEndOfLineSeparator; 507message = SR.Format(SR.InvalidLeadingZeroInNumber, character); 526throw new ArgumentException(SR.CannotWriteCommentWithEmbeddedDelimiter); 554throw new ArgumentException(SR.Format(SR.CannotEncodeInvalidUTF8, builder)); 560throw new ArgumentException(SR.Format(SR.CannotEncodeInvalidUTF16, $"0x{charAsInt:X2}")); 566throw GetInvalidOperationException(SR.Format(SR.CannotReadInvalidUTF16, $"0x{charAsInt:X2}")); 572throw GetInvalidOperationException(SR.CannotReadIncompleteUTF16); 577return GetInvalidOperationException(SR.CannotTranscodeInvalidUtf8, innerException); 582return new ArgumentException(SR.CannotTranscodeInvalidUtf16, innerException); 604throw new OutOfMemoryException(SR.Format(SR.BufferMaximumSizeExceeded, capacity)); 617SR.Format(SR.CannotWriteEndAfterProperty, (char)token) : 618SR.Format(SR.MismatchedObjectArray, (char)token); 621message = SR.Format(SR.DepthTooLarge, currentDepth & JsonConstants.RemoveFlagsBitMask, maxDepth); 624message = SR.Format(SR.CannotStartObjectArrayWithoutProperty, tokenType); 627message = SR.Format(SR.CannotStartObjectArrayAfterPrimitiveOrClose, tokenType); 630message = SR.Format(SR.CannotWriteValueWithinObject, tokenType); 634SR.CannotWritePropertyAfterProperty : 635SR.Format(SR.CannotWritePropertyWithinArray, tokenType); 638message = SR.Format(SR.CannotWriteValueAfterPrimitiveOrClose, tokenType); 641message = SR.CannotWriteWithinString; 664message = SR.FormatByte; 667message = SR.FormatSByte; 670message = SR.FormatInt16; 673message = SR.FormatInt32; 676message = SR.FormatInt64; 679message = SR.FormatInt128; 682message = SR.FormatUInt16; 685message = SR.FormatUInt32; 688message = SR.FormatUInt64; 691message = SR.FormatUInt128; 694message = SR.FormatHalf; 697message = SR.FormatSingle; 700message = SR.FormatDouble; 703message = SR.FormatDecimal; 728message = SR.Format(SR.UnsupportedFormat, dataType); 731message = SR.CannotDecodeInvalidBase64; 762throw new InsufficientExecutionStackException(SR.JsonElementDeepEqualsInsufficientExecutionStack);
System\Text\Json\ThrowHelper.Node.cs (15)
16throw new ArgumentException(SR.NodeValueNotAllowed, paramName); 22throw new ArgumentException(SR.Format(SR.NodeDuplicateKey, propertyName), paramName); 34throw new InvalidOperationException(SR.NodeAlreadyHasParent); 40throw new InvalidOperationException(SR.NodeCycleDetected); 46throw new InvalidOperationException(SR.NodeElementCannotBeObjectOrArray); 60throw new InvalidOperationException(SR.Format(SR.NodeWrongType, concatenatedNames)); 66throw new InvalidOperationException(SR.Format(SR.NodeParentWrongType, typeName)); 71return new NotSupportedException(SR.CollectionIsReadOnly); 77throw new InvalidOperationException(SR.Format(SR.NodeUnableToConvert, sourceType, destinationType)); 83throw new InvalidOperationException(SR.Format(SR.NodeUnableToConvertElement, valueKind, destinationType));
System\Text\Json\ThrowHelper.Serialization.cs (223)
22throw new ArgumentException(SR.Format(SR.DeserializeWrongType, type, value.GetType())); 28throw new ArgumentException(SR.JsonSerializerDoesNotSupportComments, paramName); 34throw new NotSupportedException(SR.Format(SR.SerializationNotSupportedType, propertyType)); 40throw new NotSupportedException(SR.Format(SR.TypeRequiresAsyncSerialization, propertyType)); 46throw new NotSupportedException(SR.Format(SR.DictionaryKeyTypeNotSupported, keyType, converter.GetType())); 52throw new JsonException(SR.Format(SR.DeserializeUnableToConvertValue, propertyType)) { AppendPathInformation = true }; 58throw new InvalidCastException(SR.Format(SR.DeserializeUnableToAssignValue, typeOfValue, declaredType)); 64throw new InvalidOperationException(SR.Format(SR.DeserializeUnableToAssignNull, declaredType)); 70throw new JsonException(SR.Format(SR.PropertyGetterDisallowNull, propertyName, declaringType)) { AppendPathInformation = true }; 76throw new JsonException(SR.Format(SR.PropertySetterDisallowNull, propertyName, declaringType)) { AppendPathInformation = true }; 82throw new JsonException(SR.Format(SR.ConstructorParameterDisallowNull, parameterName, declaringType)) { AppendPathInformation = true }; 88throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPopulateNotSupportedByConverter, propertyInfo.Name, propertyInfo.DeclaringType)); 94throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyMustHaveAGetter, propertyInfo.Name, propertyInfo.DeclaringType)); 100throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyValueTypeMustHaveASetter, propertyInfo.Name, propertyInfo.DeclaringType)); 106throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization, propertyInfo.Name, propertyInfo.DeclaringType)); 112throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowReadOnlyMember, propertyInfo.Name, propertyInfo.DeclaringType)); 118throw new InvalidOperationException(SR.ObjectCreationHandlingPropertyCannotAllowReferenceHandling); 124throw new NotSupportedException(SR.ObjectCreationHandlingPropertyDoesNotSupportParameterizedConstructors); 130throw new JsonException(SR.Format(SR.SerializationConverterRead, converter)) { AppendPathInformation = true }; 136throw new JsonException(SR.Format(SR.SerializationConverterWrite, converter)) { AppendPathInformation = true }; 142throw new JsonException(SR.Format(SR.SerializerCycleDetected, maxDepth)) { AppendPathInformation = true }; 157throw new ArgumentException(SR.Format(SR.CannotSerializeInvalidType, typeToConvert), paramName); 161throw new ArgumentException(SR.Format(SR.CannotSerializeInvalidMember, typeToConvert, propertyName, declaringType), paramName); 170throw new InvalidOperationException(SR.Format(SR.CannotSerializeInvalidType, typeToConvert)); 174throw new InvalidOperationException(SR.Format(SR.CannotSerializeInvalidMember, typeToConvert, memberInfo.Name, declaringType)); 180throw new InvalidOperationException(SR.Format(SR.SerializationConverterNotCompatible, converterType, type)); 186throw new InvalidOperationException(SR.Format(SR.ResolverTypeNotCompatible, actualType, requestedType)); 192throw new InvalidOperationException(SR.ResolverTypeInfoOptionsNotCompatible); 198throw new InvalidOperationException(SR.JsonSerializerOptionsNoTypeInfoResolverSpecified); 204throw new InvalidOperationException(SR.JsonSerializerIsReflectionDisabled); 216throw new InvalidOperationException(SR.Format(SR.SerializationConverterOnAttributeInvalid, location)); 229throw new InvalidOperationException(SR.Format(SR.SerializationConverterOnAttributeNotCompatible, location, typeToConvert)); 241throw new InvalidOperationException(SR.Format(SR.SerializationConverterOnAttributeOpenGenericNotCompatible, location, converterType)); 248? SR.SerializerOptionsReadOnly 249: SR.SerializerContextOptionsReadOnly; 257throw new InvalidOperationException(SR.DefaultTypeInfoResolverImmutable); 263throw new InvalidOperationException(SR.TypeInfoResolverChainImmutable); 269throw new InvalidOperationException(SR.TypeInfoImmutable); 275throw new InvalidOperationException(SR.SerializerOptions_InvalidChainedResolver); 281throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameConflict, type, propertyName)); 287throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameNull, jsonPropertyInfo.DeclaringType, jsonPropertyInfo.MemberName)); 293throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndNotDeserializable, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 299throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndExtensionData, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 335throw new JsonException(SR.Format(SR.JsonRequiredPropertiesMissing, parent.Type, listOfMissingPropertiesBuilder.ToString())); 341throw new JsonException(SR.Format(SR.DuplicatePropertiesNotAllowed_JsonPropertyInfo, property.Name, property.DeclaringType)); 347throw new JsonException(SR.DuplicatePropertiesNotAllowed); 353throw new JsonException(SR.Format(SR.DuplicatePropertiesNotAllowed_NameSpan, Truncate(name))); 360throw new JsonException(SR.Format(SR.DuplicatePropertiesNotAllowed_NameSpan, Truncate(name))); 381throw new InvalidOperationException(SR.Format(SR.NamingPolicyReturnNull, namingPolicy)); 387throw new InvalidOperationException(SR.Format(SR.SerializerConverterFactoryReturnsNull, converterType)); 393throw new InvalidOperationException(SR.Format(SR.SerializerConverterFactoryReturnsJsonConverterFactory, converterType)); 404SR.Format( 405SR.MultipleMembersBindWithConstructorParameter, 415throw new InvalidOperationException(SR.Format(SR.ConstructorParamIncompleteBinding, parentType)); 421throw new InvalidOperationException(SR.Format(SR.ExtensionDataCannotBindToCtorParam, propertyName, jsonPropertyInfo.DeclaringType)); 427throw new InvalidOperationException(SR.Format(SR.JsonIncludeOnInaccessibleProperty, memberName, declaringType)); 433throw new InvalidOperationException(SR.Format(SR.IgnoreConditionOnValueTypeInvalid, clrPropertyName, propertyDeclaringType)); 440throw new InvalidOperationException(SR.Format(SR.NumberHandlingOnPropertyInvalid, jsonPropertyInfo.MemberName, jsonPropertyInfo.DeclaringType)); 446throw new InvalidOperationException(SR.Format(SR.ConverterCanConvertMultipleTypes, jsonConverter.GetType(), jsonConverter.Type, runtimePropertyType)); 459SR.Format(SR.ObjectWithParameterizedCtorRefMetadataNotSupported, jsonTypeInfo.Type)); 466throw new InvalidOperationException(SR.Format(SR.InvalidJsonTypeInfoOperationForKind, kind)); 472throw new InvalidOperationException(SR.Format(SR.OnDeserializingCallbacksNotSupported, type)); 478throw new InvalidOperationException(SR.Format(SR.CreateObjectConverterNotCompatible, type)); 534message = SR.Format(SR.DeserializeUnableToConvertValue, propertyType); 564message = SR.SerializeUnableToSerialize; 579throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateAttribute, attribute, location)); 585throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateTypeAttribute, classType, attribute)); 591throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateTypeAttribute, classType, typeof(TAttribute))); 597throw new InvalidOperationException(SR.Format(SR.ExtensionDataConflictsWithUnmappedMemberHandling, classType, jsonPropertyInfo.MemberName)); 603throw new InvalidOperationException(SR.Format(SR.SerializationDataExtensionPropertyInvalid, jsonPropertyInfo.PropertyType, jsonPropertyInfo.MemberName)); 609throw new InvalidOperationException(SR.Format(SR.PropertyTypeNotNullable, jsonPropertyInfo.PropertyType)); 615throw new InvalidOperationException(SR.NodeJsonObjectCustomConverterNotAllowedOnExtensionProperty); 636message += SR.Format(SR.SerializationNotSupportedParentType, propertyType); 664message += SR.Format(SR.SerializationNotSupportedParentType, propertyType); 682message = SR.Format(SR.DeserializationMustSpecifyTypeDiscriminator, type); 686message = SR.Format(SR.CannotPopulateCollection, type); 690message = SR.Format(SR.DeserializeInterfaceOrAbstractType, type); 695message = SR.Format(SR.DeserializeNoConstructor, nameof(JsonConstructorAttribute), type); 704ThrowNotSupportedException(ref state, reader, new NotSupportedException(SR.Format(SR.CannotPopulateCollection, type))); 710ThrowJsonException(SR.Format(SR.MetadataInvalidTokenAfterValues, tokenType)); 716ThrowJsonException(SR.Format(SR.MetadataReferenceNotFound, id)); 722ThrowJsonException(SR.Format(SR.MetadataValueWasNotString, tokenType)); 728ThrowJsonException(SR.Format(SR.MetadataValueWasNotString, valueKind)); 742ThrowJsonException(SR.MetadataUnexpectedProperty); 748throw new JsonException(SR.Format(SR.UnmappedJsonProperty, unmappedPropertyName, type)); 754ThrowJsonException(SR.MetadataReferenceCannotContainOtherProperties); 761ThrowJsonException(SR.MetadataIdCannotBeCombinedWithRef); 768ThrowJsonException(SR.MetadataStandaloneValuesProperty); 784ThrowJsonException(SR.MetadataInvalidPropertyWithLeadingDollarSign); 790ThrowJsonException(SR.Format(SR.MetadataDuplicateIdFound, id)); 796ThrowJsonException(SR.Format(SR.DuplicateMetadataProperty, Encoding.UTF8.GetString(utf8PropertyName))); 802ThrowJsonException(SR.Format(SR.MetadataInvalidReferenceToValueType, propertyType)); 811ThrowJsonException(SR.Format(SR.MetadataPreservedArrayFailed, 812SR.Format(SR.MetadataInvalidPropertyInArrayMetadata, propertyNameAsString), 813SR.Format(SR.DeserializeUnableToConvertValue, propertyType))); 822ThrowJsonException(SR.Format(SR.MetadataPreservedArrayFailed, 823SR.MetadataStandaloneValuesProperty, 824SR.Format(SR.DeserializeUnableToConvertValue, propertyType))); 830ThrowJsonException(SR.Format(SR.MetadataCannotParsePreservedObjectToImmutable, propertyType)); 836throw new InvalidOperationException(SR.Format(SR.MetadataReferenceOfTypeCannotBeAssignedToType, referenceId, currentType, typeToConvert)); 843throw new InvalidOperationException(SR.Format(SR.JsonPropertyInfoBoundToDifferentParent, propertyInfo.Name, propertyInfo.DeclaringTypeInfo.Type.FullName)); 867throw new NotSupportedException(SR.Format(SR.NoMetadataForType, type, resolver?.ToString() ?? "<null>")); 872return new NotSupportedException(SR.Format(SR.AmbiguousMetadataForType, type, match1, match2)); 878throw new NotSupportedException(SR.Format(SR.ConstructorContainsNullParameterNames, declaringType)); 884throw new InvalidOperationException(SR.Format(SR.NoMetadataForType, type, resolver?.ToString() ?? "<null>")); 889return new InvalidOperationException(SR.Format(SR.NoMetadataForTypeProperties, resolver?.ToString() ?? "<null>", type)); 901throw new MissingMemberException(SR.Format(SR.MissingFSharpCoreMember, missingFsharpCoreMember)); 907throw new NotSupportedException(SR.Format(SR.Polymorphism_DerivedConverterDoesNotSupportMetadata, derivedType)); 913throw new NotSupportedException(SR.Format(SR.Polymorphism_DerivedConverterDoesNotSupportMetadata, derivedType)); 919throw new NotSupportedException(SR.Format(SR.Polymorphism_RuntimeTypeNotSupported, runtimeType, baseType)); 925throw new NotSupportedException(SR.Format(SR.Polymorphism_RuntimeTypeDiamondAmbiguity, runtimeType, derivedType1, derivedType2, baseType)); 931throw new InvalidOperationException(SR.Format(SR.Polymorphism_TypeDoesNotSupportPolymorphism, baseType)); 937throw new InvalidOperationException(SR.Format(SR.Polymorphism_DerivedTypeIsNotSupported, derivedType, baseType)); 943throw new InvalidOperationException(SR.Format(SR.Polymorphism_DerivedTypeIsAlreadySpecified, baseType, derivedType)); 949throw new InvalidOperationException(SR.Format(SR.Polymorphism_TypeDicriminatorIdIsAlreadySpecified, baseType, typeDiscriminator)); 955throw new InvalidOperationException(SR.Polymorphism_InvalidCustomTypeDiscriminatorPropertyName); 961throw new InvalidOperationException(SR.Format(SR.Polymorphism_PropertyConflictsWithMetadataPropertyName, type, propertyName)); 967throw new InvalidOperationException(SR.Format(SR.Polymorphism_ConfigurationDoesNotSpecifyDerivedTypes, baseType)); 973throw new InvalidOperationException(SR.Format(SR.UnsupportedEnumIdentifier, enumType.Name, enumName)); 979ThrowJsonException(SR.Format(SR.Polymorphism_UnrecognizedTypeDiscriminator, typeDiscriminator)); 985throw new ArgumentException(SR.JsonPolymorphismOptionsAssociatedWithDifferentJsonTypeInfo, paramName: parameterName); 991throw new OperationCanceledException(SR.PipeWriterCanceled); 997throw new OperationCanceledException(SR.PipeReaderCanceled); 1003throw new InvalidOperationException(SR.Format(SR.PipeWriter_DoesNotImplementUnflushedBytes, pipeWriter.GetType().Name)); 1009throw new NotSupportedException(SR.JsonSchemaExporter_ReferenceHandlerPreserve_NotSupported); 1015throw new InvalidOperationException(SR.JsonSchemaExporter_DepthTooLarge);
System\Text\Json\Writer\JsonWriterHelper.cs (8)
169throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 199throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 222throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 235SR.Format(SR.ExpectedEndOfDigitNotFound, ThrowHelper.GetPrintableString(val)), 241throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 252SR.Format(SR.ExpectedEndOfDigitNotFound, ThrowHelper.GetPrintableString(utf8FormattedNumber[i])),
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
240throw new ArgumentException(SR.StreamNotWritable); 302throw new ArgumentException(SR.StreamNotWritable);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (2)
145ThrowHelper.ThrowArgumentException(SR.ExpectedJsonTokens); 234ThrowHelper.ThrowArgumentException(SR.ExpectedJsonTokens);
System\ThrowHelper.cs (4)
6using SR = System.SR; 21throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); 85return SR.ArgumentOutOfRange_IndexMustBeLess; 87return SR.Argument_CannotExtractScalar;