<PackageReference Include="System.Text.Json" Version="6.0.0-preview.3.21201.4" />

SR

static class SR
using FxResources.System.Text.Json; using System.Resources; namespace System { internal static class SR { private static readonly bool s_usingResourceKeys = AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool isEnabled) && isEnabled; private static ResourceManager s_resourceManager; internal static ResourceManager ResourceManager => s_resourceManager ?? (s_resourceManager = new ResourceManager(typeof(FxResources.System.Text.Json.SR))); internal static string ArrayDepthTooLarge => GetResourceString("ArrayDepthTooLarge", null); internal static string CallFlushToAvoidDataLoss => GetResourceString("CallFlushToAvoidDataLoss", null); internal static string CannotReadIncompleteUTF16 => GetResourceString("CannotReadIncompleteUTF16", null); internal static string CannotReadInvalidUTF16 => GetResourceString("CannotReadInvalidUTF16", null); internal static string CannotStartObjectArrayAfterPrimitiveOrClose => GetResourceString("CannotStartObjectArrayAfterPrimitiveOrClose", null); internal static string CannotStartObjectArrayWithoutProperty => GetResourceString("CannotStartObjectArrayWithoutProperty", null); internal static string CannotTranscodeInvalidUtf8 => GetResourceString("CannotTranscodeInvalidUtf8", null); internal static string CannotDecodeInvalidBase64 => GetResourceString("CannotDecodeInvalidBase64", null); internal static string CannotTranscodeInvalidUtf16 => GetResourceString("CannotTranscodeInvalidUtf16", null); internal static string CannotEncodeInvalidUTF16 => GetResourceString("CannotEncodeInvalidUTF16", null); internal static string CannotEncodeInvalidUTF8 => GetResourceString("CannotEncodeInvalidUTF8", null); internal static string CannotWritePropertyWithinArray => GetResourceString("CannotWritePropertyWithinArray", null); internal static string CannotWritePropertyAfterProperty => GetResourceString("CannotWritePropertyAfterProperty", null); internal static string CannotWriteValueAfterPrimitiveOrClose => GetResourceString("CannotWriteValueAfterPrimitiveOrClose", null); internal static string CannotWriteValueWithinObject => GetResourceString("CannotWriteValueWithinObject", null); internal static string DepthTooLarge => GetResourceString("DepthTooLarge", null); internal static string EmptyJsonIsInvalid => GetResourceString("EmptyJsonIsInvalid", null); internal static string EndOfCommentNotFound => GetResourceString("EndOfCommentNotFound", null); internal static string EndOfStringNotFound => GetResourceString("EndOfStringNotFound", null); internal static string ExpectedEndAfterSingleJson => GetResourceString("ExpectedEndAfterSingleJson", null); internal static string ExpectedEndOfDigitNotFound => GetResourceString("ExpectedEndOfDigitNotFound", null); internal static string ExpectedFalse => GetResourceString("ExpectedFalse", null); internal static string ExpectedJsonTokens => GetResourceString("ExpectedJsonTokens", null); internal static string ExpectedOneCompleteToken => GetResourceString("ExpectedOneCompleteToken", null); internal static string ExpectedNextDigitEValueNotFound => GetResourceString("ExpectedNextDigitEValueNotFound", null); internal static string ExpectedNull => GetResourceString("ExpectedNull", null); internal static string ExpectedSeparatorAfterPropertyNameNotFound => GetResourceString("ExpectedSeparatorAfterPropertyNameNotFound", null); internal static string ExpectedStartOfPropertyNotFound => GetResourceString("ExpectedStartOfPropertyNotFound", null); internal static string ExpectedStartOfPropertyOrValueNotFound => GetResourceString("ExpectedStartOfPropertyOrValueNotFound", null); internal static string ExpectedStartOfValueNotFound => GetResourceString("ExpectedStartOfValueNotFound", null); internal static string ExpectedTrue => GetResourceString("ExpectedTrue", null); internal static string ExpectedValueAfterPropertyNameNotFound => GetResourceString("ExpectedValueAfterPropertyNameNotFound", null); internal static string FailedToGetLargerSpan => GetResourceString("FailedToGetLargerSpan", null); internal static string FoundInvalidCharacter => GetResourceString("FoundInvalidCharacter", null); internal static string InvalidCast => GetResourceString("InvalidCast", null); internal static string InvalidCharacterAfterEscapeWithinString => GetResourceString("InvalidCharacterAfterEscapeWithinString", null); internal static string InvalidCharacterWithinString => GetResourceString("InvalidCharacterWithinString", null); internal static string InvalidEndOfJsonNonPrimitive => GetResourceString("InvalidEndOfJsonNonPrimitive", null); internal static string InvalidHexCharacterWithinString => GetResourceString("InvalidHexCharacterWithinString", null); internal static string JsonDocumentDoesNotSupportComments => GetResourceString("JsonDocumentDoesNotSupportComments", null); internal static string JsonElementHasWrongType => GetResourceString("JsonElementHasWrongType", null); internal static string MaxDepthMustBePositive => GetResourceString("MaxDepthMustBePositive", null); internal static string CommentHandlingMustBeValid => GetResourceString("CommentHandlingMustBeValid", null); internal static string MismatchedObjectArray => GetResourceString("MismatchedObjectArray", null); internal static string CannotWriteEndAfterProperty => GetResourceString("CannotWriteEndAfterProperty", null); internal static string ObjectDepthTooLarge => GetResourceString("ObjectDepthTooLarge", null); internal static string PropertyNameTooLarge => GetResourceString("PropertyNameTooLarge", null); internal static string FormatDecimal => GetResourceString("FormatDecimal", null); internal static string FormatDouble => GetResourceString("FormatDouble", null); internal static string FormatInt32 => GetResourceString("FormatInt32", null); internal static string FormatInt64 => GetResourceString("FormatInt64", null); internal static string FormatSingle => GetResourceString("FormatSingle", null); internal static string FormatUInt32 => GetResourceString("FormatUInt32", null); internal static string FormatUInt64 => GetResourceString("FormatUInt64", null); internal static string RequiredDigitNotFoundAfterDecimal => GetResourceString("RequiredDigitNotFoundAfterDecimal", null); internal static string RequiredDigitNotFoundAfterSign => GetResourceString("RequiredDigitNotFoundAfterSign", null); internal static string RequiredDigitNotFoundEndOfData => GetResourceString("RequiredDigitNotFoundEndOfData", null); internal static string SpecialNumberValuesNotSupported => GetResourceString("SpecialNumberValuesNotSupported", null); internal static string ValueTooLarge => GetResourceString("ValueTooLarge", null); internal static string ZeroDepthAtEnd => GetResourceString("ZeroDepthAtEnd", null); internal static string DeserializeUnableToConvertValue => GetResourceString("DeserializeUnableToConvertValue", null); internal static string DeserializeWrongType => GetResourceString("DeserializeWrongType", null); internal static string SerializationInvalidBufferSize => GetResourceString("SerializationInvalidBufferSize", null); internal static string BufferWriterAdvancedTooFar => GetResourceString("BufferWriterAdvancedTooFar", null); internal static string InvalidComparison => GetResourceString("InvalidComparison", null); internal static string FormatDateTime => GetResourceString("FormatDateTime", null); internal static string FormatDateTimeOffset => GetResourceString("FormatDateTimeOffset", null); internal static string FormatGuid => GetResourceString("FormatGuid", null); internal static string ExpectedStartOfPropertyOrValueAfterComment => GetResourceString("ExpectedStartOfPropertyOrValueAfterComment", null); internal static string TrailingCommaNotAllowedBeforeArrayEnd => GetResourceString("TrailingCommaNotAllowedBeforeArrayEnd", null); internal static string TrailingCommaNotAllowedBeforeObjectEnd => GetResourceString("TrailingCommaNotAllowedBeforeObjectEnd", null); internal static string SerializerOptionsImmutable => GetResourceString("SerializerOptionsImmutable", null); internal static string StreamNotWritable => GetResourceString("StreamNotWritable", null); internal static string CannotWriteCommentWithEmbeddedDelimiter => GetResourceString("CannotWriteCommentWithEmbeddedDelimiter", null); internal static string SerializerPropertyNameConflict => GetResourceString("SerializerPropertyNameConflict", null); internal static string SerializerPropertyNameNull => GetResourceString("SerializerPropertyNameNull", null); internal static string DeserializeDuplicateKey => GetResourceString("DeserializeDuplicateKey", null); internal static string SerializationDataExtensionPropertyInvalid => GetResourceString("SerializationDataExtensionPropertyInvalid", null); internal static string SerializationDuplicateTypeAttribute => GetResourceString("SerializationDuplicateTypeAttribute", null); internal static string SerializationNotSupportedType => GetResourceString("SerializationNotSupportedType", null); internal static string InvalidCharacterAtStartOfComment => GetResourceString("InvalidCharacterAtStartOfComment", null); internal static string UnexpectedEndOfDataWhileReadingComment => GetResourceString("UnexpectedEndOfDataWhileReadingComment", null); internal static string CannotSkip => GetResourceString("CannotSkip", null); internal static string NotEnoughData => GetResourceString("NotEnoughData", null); internal static string UnexpectedEndOfLineSeparator => GetResourceString("UnexpectedEndOfLineSeparator", null); internal static string JsonSerializerDoesNotSupportComments => GetResourceString("JsonSerializerDoesNotSupportComments", null); internal static string DeserializeNoConstructor => GetResourceString("DeserializeNoConstructor", null); internal static string DeserializePolymorphicInterface => GetResourceString("DeserializePolymorphicInterface", null); internal static string SerializationConverterOnAttributeNotCompatible => GetResourceString("SerializationConverterOnAttributeNotCompatible", null); internal static string SerializationConverterOnAttributeInvalid => GetResourceString("SerializationConverterOnAttributeInvalid", null); internal static string SerializationConverterRead => GetResourceString("SerializationConverterRead", null); internal static string SerializationConverterNotCompatible => GetResourceString("SerializationConverterNotCompatible", null); internal static string SerializationConverterWrite => GetResourceString("SerializationConverterWrite", null); internal static string NamingPolicyReturnNull => GetResourceString("NamingPolicyReturnNull", null); internal static string SerializationDuplicateAttribute => GetResourceString("SerializationDuplicateAttribute", null); internal static string SerializeUnableToSerialize => GetResourceString("SerializeUnableToSerialize", null); internal static string FormatByte => GetResourceString("FormatByte", null); internal static string FormatInt16 => GetResourceString("FormatInt16", null); internal static string FormatSByte => GetResourceString("FormatSByte", null); internal static string FormatUInt16 => GetResourceString("FormatUInt16", null); internal static string SerializerCycleDetected => GetResourceString("SerializerCycleDetected", null); internal static string EmptyStringToInitializeNumber => GetResourceString("EmptyStringToInitializeNumber", null); internal static string JsonObjectDuplicateKey => GetResourceString("JsonObjectDuplicateKey", null); internal static string PropertyNotFound => GetResourceString("PropertyNotFound", null); internal static string PropertyTypeMismatch => GetResourceString("PropertyTypeMismatch", null); internal static string InvalidDuplicatePropertyNameHandling => GetResourceString("InvalidDuplicatePropertyNameHandling", null); internal static string InvalidLeadingZeroInNumber => GetResourceString("InvalidLeadingZeroInNumber", null); internal static string ArrayModifiedDuringIteration => GetResourceString("ArrayModifiedDuringIteration", null); internal static string NotNodeJsonElementParent => GetResourceString("NotNodeJsonElementParent", null); internal static string MetadataCannotParsePreservedObjectToImmutable => GetResourceString("MetadataCannotParsePreservedObjectToImmutable", null); internal static string MetadataDuplicateIdFound => GetResourceString("MetadataDuplicateIdFound", null); internal static string MetadataIdIsNotFirstProperty => GetResourceString("MetadataIdIsNotFirstProperty", null); internal static string MetadataInvalidReferenceToValueType => GetResourceString("MetadataInvalidReferenceToValueType", null); internal static string MetadataInvalidTokenAfterValues => GetResourceString("MetadataInvalidTokenAfterValues", null); internal static string MetadataPreservedArrayFailed => GetResourceString("MetadataPreservedArrayFailed", null); internal static string MetadataPreservedArrayInvalidProperty => GetResourceString("MetadataPreservedArrayInvalidProperty", null); internal static string MetadataPreservedArrayPropertyNotFound => GetResourceString("MetadataPreservedArrayPropertyNotFound", null); internal static string MetadataReferenceCannotContainOtherProperties => GetResourceString("MetadataReferenceCannotContainOtherProperties", null); internal static string MetadataReferenceNotFound => GetResourceString("MetadataReferenceNotFound", null); internal static string MetadataValueWasNotString => GetResourceString("MetadataValueWasNotString", null); internal static string MetadataInvalidPropertyWithLeadingDollarSign => GetResourceString("MetadataInvalidPropertyWithLeadingDollarSign", null); internal static string MultipleMembersBindWithConstructorParameter => GetResourceString("MultipleMembersBindWithConstructorParameter", null); internal static string ConstructorParamIncompleteBinding => GetResourceString("ConstructorParamIncompleteBinding", null); internal static string ConstructorMaxOf64Parameters => GetResourceString("ConstructorMaxOf64Parameters", null); internal static string ObjectWithParameterizedCtorRefMetadataNotHonored => GetResourceString("ObjectWithParameterizedCtorRefMetadataNotHonored", null); internal static string SerializerConverterFactoryReturnsNull => GetResourceString("SerializerConverterFactoryReturnsNull", null); internal static string SerializationNotSupportedParentType => GetResourceString("SerializationNotSupportedParentType", null); internal static string ExtensionDataCannotBindToCtorParam => GetResourceString("ExtensionDataCannotBindToCtorParam", null); internal static string BufferMaximumSizeExceeded => GetResourceString("BufferMaximumSizeExceeded", null); internal static string CannotSerializeInvalidType => GetResourceString("CannotSerializeInvalidType", null); internal static string SerializeTypeInstanceNotSupported => GetResourceString("SerializeTypeInstanceNotSupported", null); internal static string JsonIncludeOnNonPublicInvalid => GetResourceString("JsonIncludeOnNonPublicInvalid", null); internal static string CannotSerializeInvalidMember => GetResourceString("CannotSerializeInvalidMember", null); internal static string CannotPopulateCollection => GetResourceString("CannotPopulateCollection", null); internal static string DefaultIgnoreConditionAlreadySpecified => GetResourceString("DefaultIgnoreConditionAlreadySpecified", null); internal static string DefaultIgnoreConditionInvalid => GetResourceString("DefaultIgnoreConditionInvalid", null); internal static string FormatBoolean => GetResourceString("FormatBoolean", null); internal static string DictionaryKeyTypeNotSupported => GetResourceString("DictionaryKeyTypeNotSupported", null); internal static string IgnoreConditionOnValueTypeInvalid => GetResourceString("IgnoreConditionOnValueTypeInvalid", null); internal static string NumberHandlingConverterMustBeBuiltIn => GetResourceString("NumberHandlingConverterMustBeBuiltIn", null); internal static string NumberHandlingOnPropertyTypeMustBeNumberOrCollection => GetResourceString("NumberHandlingOnPropertyTypeMustBeNumberOrCollection", null); internal static string ConverterCanConvertNullableRedundant => GetResourceString("ConverterCanConvertNullableRedundant", null); internal static string MetadataReferenceOfTypeCannotBeAssignedToType => GetResourceString("MetadataReferenceOfTypeCannotBeAssignedToType", null); internal static string DeserializeUnableToAssignValue => GetResourceString("DeserializeUnableToAssignValue", null); internal static string DeserializeUnableToAssignNull => GetResourceString("DeserializeUnableToAssignNull", null); private static bool UsingResourceKeys() { return s_usingResourceKeys; } internal static string GetResourceString(string resourceKey, string defaultString = null) { if (UsingResourceKeys()) return defaultString ?? resourceKey; string text = null; try { text = ResourceManager.GetString(resourceKey); } catch (MissingManifestResourceException) { } if (defaultString != null && resourceKey.Equals(text)) return defaultString; return text; } internal static string Format(string resourceFormat, object p1) { if (UsingResourceKeys()) return string.Join(", ", resourceFormat, p1); return string.Format(resourceFormat, p1); } internal static string Format(string resourceFormat, object p1, object p2) { if (UsingResourceKeys()) return string.Join(", ", resourceFormat, p1, p2); return string.Format(resourceFormat, p1, p2); } internal static string Format(string resourceFormat, object p1, object p2, object p3) { if (UsingResourceKeys()) return string.Join(", ", resourceFormat, p1, p2, p3); return string.Format(resourceFormat, p1, p2, p3); } internal static string Format(string resourceFormat, params object[] args) { if (args != null) { if (UsingResourceKeys()) return resourceFormat + ", " + string.Join(", ", args); return string.Format(resourceFormat, args); } return resourceFormat; } internal static string Format(IFormatProvider provider, string resourceFormat, object p1) { if (UsingResourceKeys()) return string.Join(", ", resourceFormat, p1); return string.Format(provider, resourceFormat, p1); } internal static string Format(IFormatProvider provider, string resourceFormat, object p1, object p2) { if (UsingResourceKeys()) return string.Join(", ", resourceFormat, p1, p2); return string.Format(provider, resourceFormat, p1, p2); } internal static string Format(IFormatProvider provider, string resourceFormat, object p1, object p2, object p3) { if (UsingResourceKeys()) return string.Join(", ", resourceFormat, p1, p2, p3); return string.Format(provider, resourceFormat, p1, p2, p3); } internal static string Format(IFormatProvider provider, string resourceFormat, params object[] args) { if (args != null) { if (UsingResourceKeys()) return resourceFormat + ", " + string.Join(", ", args); return string.Format(provider, resourceFormat, args); } return resourceFormat; } } }