System.Text.Json.ThrowHelper
namespace System.Text.Json
{
internal static class ThrowHelper
{
public static void ThrowArgumentNullException(string parameterName);
public static void ThrowArgumentOutOfRangeException_NewLine(string parameterName);
public static void ThrowArgumentOutOfRangeException_IndentCharacter(string parameterName);
public static void ThrowArgumentOutOfRangeException_IndentSize(string parameterName, int minimumSize, int maximumSize);
public static void ThrowArgumentOutOfRangeException_MaxDepthMustBePositive(string parameterName);
public static void ThrowArgumentOutOfRangeException_JsonNumberExponentTooLarge(string parameterName);
public static void ThrowArgumentOutOfRangeException_CommentEnumMustBeInRange(string parameterName);
public static void ThrowArgumentOutOfRangeException_JsonConverterFactory_TypeNotSupported(Type typeToConvert);
public static void ThrowArgumentOutOfRangeException_NeedNonNegNum(string paramName);
public static void ThrowArgumentException_InvalidOffLen();
public static void ThrowArgumentException(string message);
public static void ThrowArgumentException_DestinationTooShort();
public static void ThrowArgumentException_PropertyNameTooLarge(int tokenLength);
public static void ThrowArgumentException_ValueTooLarge(long tokenLength);
public static void ThrowArgumentException_ValueNotSupported();
public static void ThrowInvalidOperationException_NeedLargerSpan();
public static void ThrowPropertyNameTooLargeArgumentException(int length);
public static void ThrowArgumentException(ReadOnlySpan<byte> propertyName, ReadOnlySpan<byte> value);
public static void ThrowArgumentException(ReadOnlySpan<byte> propertyName, ReadOnlySpan<char> value);
public static void ThrowArgumentException(ReadOnlySpan<char> propertyName, ReadOnlySpan<byte> value);
public static void ThrowArgumentException(ReadOnlySpan<char> propertyName, ReadOnlySpan<char> value);
public static void ThrowInvalidOperationOrArgumentException(ReadOnlySpan<byte> propertyName, int currentDepth, int maxDepth);
public static void ThrowInvalidOperationException(int currentDepth, int maxDepth);
public static void ThrowInvalidOperationException(string message);
public static void ThrowInvalidOperationOrArgumentException(ReadOnlySpan<char> propertyName, int currentDepth, int maxDepth);
public static InvalidOperationException GetInvalidOperationException_ExpectedArray(JsonTokenType tokenType);
public static InvalidOperationException GetInvalidOperationException_ExpectedObject(JsonTokenType tokenType);
public static void ThrowInvalidOperationException_ExpectedNumber(JsonTokenType tokenType);
public static void ThrowInvalidOperationException_ExpectedBoolean(JsonTokenType tokenType);
public static void ThrowInvalidOperationException_ExpectedString(JsonTokenType tokenType);
public static void ThrowInvalidOperationException_ExpectedPropertyName(JsonTokenType tokenType);
public static void ThrowInvalidOperationException_ExpectedStringComparison(JsonTokenType tokenType);
public static void ThrowInvalidOperationException_ExpectedComment(JsonTokenType tokenType);
public static void ThrowInvalidOperationException_CannotSkipOnPartial();
public static void ThrowInvalidOperationException_CannotMixEncodings(Utf8JsonWriter.EnclosingContainerType previousEncoding, Utf8JsonWriter.EnclosingContainerType currentEncoding);
public static void ThrowJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte = 0, ReadOnlySpan<byte> bytes = default(ReadOnlySpan<byte>));
public static JsonException GetJsonReaderException(ref Utf8JsonReader json, ExceptionResource resource, byte nextByte, ReadOnlySpan<byte> bytes);
public static void ThrowInvalidOperationException(ExceptionResource resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType);
public static void ThrowArgumentException_InvalidCommentValue();
public static void ThrowArgumentException_InvalidUTF8(ReadOnlySpan<byte> value);
public static void ThrowArgumentException_InvalidUTF16(int charAsInt);
public static void ThrowInvalidOperationException_ReadInvalidUTF16(int charAsInt);
public static void ThrowInvalidOperationException_ReadIncompleteUTF16();
public static InvalidOperationException GetInvalidOperationException_ReadInvalidUTF8(DecoderFallbackException innerException = null);
public static ArgumentException GetArgumentException_ReadInvalidUTF16(EncoderFallbackException innerException);
public static InvalidOperationException GetInvalidOperationException(string message, Exception innerException);
public static InvalidOperationException GetInvalidOperationException(ExceptionResource resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType);
public static void ThrowOutOfMemoryException(uint capacity);
public static void ThrowFormatException();
public static void ThrowFormatException(NumericType numericType);
public static void ThrowFormatException(DataType dataType);
public static void ThrowInvalidOperationException_ExpectedChar(JsonTokenType tokenType);
public static void ThrowObjectDisposedException_Utf8JsonWriter();
public static void ThrowObjectDisposedException_JsonDocument();
public static void ThrowInsufficientExecutionStackException_JsonElementDeepEqualsInsufficientExecutionStack();
public static void ThrowArgumentException_NodeValueNotAllowed(string paramName);
public static void ThrowInvalidOperationException_NodeAlreadyHasParent();
public static void ThrowInvalidOperationException_NodeCycleDetected();
public static void ThrowInvalidOperationException_NodeElementCannotBeObjectOrArray();
public static void ThrowInvalidOperationException_NodeWrongType(ReadOnlySpan<string> supportedTypeNames);
public static void ThrowInvalidOperationException_NodeParentWrongType(string typeName);
public static void ThrowInvalidOperationException_NodeUnableToConvert(Type sourceType, Type destinationType);
public static void ThrowInvalidOperationException_NodeUnableToConvertElement(JsonValueKind valueKind, Type destinationType);
public static void ThrowArgumentException_DeserializeWrongType(Type type, object value);
public static void ThrowArgumentException_SerializerDoesNotSupportComments(string paramName);
public static void ThrowNotSupportedException_SerializationNotSupported(Type propertyType);
public static void ThrowNotSupportedException_TypeRequiresAsyncSerialization(Type propertyType);
public static void ThrowNotSupportedException_DictionaryKeyTypeNotSupported(Type keyType, JsonConverter converter);
public static void ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType);
public static void ThrowInvalidCastException_DeserializeUnableToAssignValue(Type typeOfValue, Type declaredType);
public static void ThrowInvalidOperationException_DeserializeUnableToAssignNull(Type declaredType);
public static void ThrowJsonException_PropertyGetterDisallowNull(string propertyName, Type declaringType);
public static void ThrowJsonException_PropertySetterDisallowNull(string propertyName, Type declaringType);
public static void ThrowJsonException_ConstructorParameterDisallowNull(string parameterName, Type declaringType);
public static void ThrowInvalidOperationException_ObjectCreationHandlingPopulateNotSupportedByConverter(JsonPropertyInfo propertyInfo);
public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyMustHaveAGetter(JsonPropertyInfo propertyInfo);
public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyValueTypeMustHaveASetter(JsonPropertyInfo propertyInfo);
public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization(JsonPropertyInfo propertyInfo);
public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyCannotAllowReadOnlyMember(JsonPropertyInfo propertyInfo);
public static void ThrowInvalidOperationException_ObjectCreationHandlingPropertyCannotAllowReferenceHandling();
public static void ThrowNotSupportedException_ObjectCreationHandlingPropertyDoesNotSupportParameterizedConstructors();
public static void ThrowJsonException_SerializationConverterRead(JsonConverter converter);
public static void ThrowJsonException_SerializationConverterWrite(JsonConverter converter);
public static void ThrowJsonException_SerializerCycleDetected(int maxDepth);
public static void ThrowJsonException(string message = null);
public static void ThrowArgumentException_CannotSerializeInvalidType(string paramName, Type typeToConvert, Type declaringType, string propertyName);
public static void ThrowInvalidOperationException_CannotSerializeInvalidType(Type typeToConvert, Type declaringType, MemberInfo memberInfo);
public static void ThrowInvalidOperationException_SerializationConverterNotCompatible(Type converterType, Type type);
public static void ThrowInvalidOperationException_ResolverTypeNotCompatible(Type requestedType, Type actualType);
public static void ThrowInvalidOperationException_ResolverTypeInfoOptionsNotCompatible();
public static void ThrowInvalidOperationException_JsonSerializerOptionsNoTypeInfoResolverSpecified();
public static void ThrowInvalidOperationException_JsonSerializerIsReflectionDisabled();
public static void ThrowInvalidOperationException_SerializationConverterOnAttributeInvalid(Type classType, MemberInfo memberInfo);
public static void ThrowInvalidOperationException_SerializationConverterOnAttributeNotCompatible(Type classTypeAttributeIsOn, MemberInfo memberInfo, Type typeToConvert);
public static void ThrowInvalidOperationException_SerializerOptionsReadOnly(JsonSerializerContext context);
public static void ThrowInvalidOperationException_DefaultTypeInfoResolverImmutable();
public static void ThrowInvalidOperationException_TypeInfoResolverChainImmutable();
public static void ThrowInvalidOperationException_TypeInfoImmutable();
public static void ThrowInvalidOperationException_InvalidChainedResolver();
public static void ThrowInvalidOperationException_SerializerPropertyNameConflict(Type type, string propertyName);
public static void ThrowInvalidOperationException_SerializerPropertyNameNull(JsonPropertyInfo jsonPropertyInfo);
public static void ThrowInvalidOperationException_JsonPropertyRequiredAndNotDeserializable(JsonPropertyInfo jsonPropertyInfo);
public static void ThrowInvalidOperationException_JsonPropertyRequiredAndExtensionData(JsonPropertyInfo jsonPropertyInfo);
public static void ThrowJsonException_JsonRequiredPropertyMissing(JsonTypeInfo parent, BitArray assignedOrNotRequiredPropertiesSet);
public static void ThrowJsonException_DuplicatePropertyNotAllowed(JsonPropertyInfo property);
public static void ThrowJsonException_DuplicatePropertyNotAllowed();
public static void ThrowJsonException_DuplicatePropertyNotAllowed(string name);
public static void ThrowJsonException_DuplicatePropertyNotAllowed(ReadOnlySpan<byte> nameBytes);
public static void ThrowInvalidOperationException_NamingPolicyReturnNull(JsonNamingPolicy namingPolicy);
public static void ThrowInvalidOperationException_SerializerConverterFactoryReturnsNull(Type converterType);
public static void ThrowInvalidOperationException_SerializerConverterFactoryReturnsJsonConverterFactory(Type converterType);
public static void ThrowInvalidOperationException_MultiplePropertiesBindToConstructorParameters(Type parentType, string parameterName, string firstMatchName, string secondMatchName);
public static void ThrowInvalidOperationException_ConstructorParameterIncompleteBinding(Type parentType);
public static void ThrowInvalidOperationException_ExtensionDataCannotBindToCtorParam(string propertyName, JsonPropertyInfo jsonPropertyInfo);
public static void ThrowInvalidOperationException_JsonIncludeOnInaccessibleProperty(string memberName, Type declaringType);
public static void ThrowInvalidOperationException_IgnoreConditionOnValueTypeInvalid(string clrPropertyName, Type propertyDeclaringType);
public static void ThrowInvalidOperationException_NumberHandlingOnPropertyInvalid(JsonPropertyInfo jsonPropertyInfo);
public static void ThrowInvalidOperationException_ConverterCanConvertMultipleTypes(Type runtimePropertyType, JsonConverter jsonConverter);
public static void ThrowNotSupportedException_ObjectWithParameterizedCtorRefMetadataNotSupported(ReadOnlySpan<byte> propertyName, ref Utf8JsonReader reader, ref ReadStack state);
public static void ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(JsonTypeInfoKind kind);
public static void ThrowInvalidOperationException_JsonTypeInfoOnDeserializingCallbacksNotSupported(Type type);
public static void ThrowInvalidOperationException_CreateObjectConverterNotCompatible(Type type);
public static void ReThrowWithPath(ref ReadStack state, JsonReaderException ex);
public static void ReThrowWithPath(ref ReadStack state, ref Utf8JsonReader reader, Exception ex);
public static void AddJsonExceptionInformation(ref ReadStack state, ref Utf8JsonReader reader, JsonException ex);
public static void ReThrowWithPath(ref WriteStack state, Exception ex);
public static void AddJsonExceptionInformation(ref WriteStack state, JsonException ex);
public static void ThrowInvalidOperationException_SerializationDuplicateAttribute(Type attribute, MemberInfo memberInfo);
public static void ThrowInvalidOperationException_SerializationDuplicateTypeAttribute(Type classType, Type attribute);
public static void ThrowInvalidOperationException_SerializationDuplicateTypeAttribute<TAttribute>(Type classType);
public static void ThrowInvalidOperationException_ExtensionDataConflictsWithUnmappedMemberHandling(Type classType, JsonPropertyInfo jsonPropertyInfo);
public static void ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid(JsonPropertyInfo jsonPropertyInfo);
public static void ThrowInvalidOperationException_PropertyTypeNotNullable(JsonPropertyInfo jsonPropertyInfo);
public static void ThrowInvalidOperationException_NodeJsonObjectCustomConverterNotAllowedOnExtensionProperty();
public static void ThrowNotSupportedException(ref ReadStack state, ref Utf8JsonReader reader, Exception innerException);
public static void ThrowNotSupportedException(ref WriteStack state, Exception innerException);
public static void ThrowNotSupportedException_DeserializeNoConstructor(JsonTypeInfo typeInfo, ref Utf8JsonReader reader, ref ReadStack state);
public static void ThrowNotSupportedException_CannotPopulateCollection(Type type, ref Utf8JsonReader reader, ref ReadStack state);
public static void ThrowJsonException_MetadataValuesInvalidToken(JsonTokenType tokenType);
public static void ThrowJsonException_MetadataReferenceNotFound(string id);
public static void ThrowJsonException_MetadataValueWasNotString(JsonTokenType tokenType);
public static void ThrowJsonException_MetadataValueWasNotString(JsonValueKind valueKind);
public static void ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties(ReadOnlySpan<byte> propertyName, ref ReadStack state);
public static void ThrowJsonException_MetadataUnexpectedProperty(ReadOnlySpan<byte> propertyName, ref ReadStack state);
public static void ThrowJsonException_UnmappedJsonProperty(Type type, string unmappedPropertyName);
public static void ThrowJsonException_MetadataReferenceObjectCannotContainOtherProperties();
public static void ThrowJsonException_MetadataIdCannotBeCombinedWithRef(ReadOnlySpan<byte> propertyName, ref ReadStack state);
public static void ThrowJsonException_MetadataStandaloneValuesProperty(ref ReadStack state, ReadOnlySpan<byte> propertyName);
public static void ThrowJsonException_MetadataInvalidPropertyWithLeadingDollarSign(ReadOnlySpan<byte> propertyName, ref ReadStack state, ref Utf8JsonReader reader);
public static void ThrowJsonException_MetadataDuplicateIdFound(string id);
public static void ThrowJsonException_DuplicateMetadataProperty(ReadOnlySpan<byte> utf8PropertyName);
public static void ThrowJsonException_MetadataInvalidReferenceToValueType(Type propertyType);
public static void ThrowJsonException_MetadataInvalidPropertyInArrayMetadata(ref ReadStack state, Type propertyType, ref Utf8JsonReader reader);
public static void ThrowJsonException_MetadataPreservedArrayValuesNotFound(ref ReadStack state, Type propertyType);
public static void ThrowJsonException_MetadataCannotParsePreservedObjectIntoImmutable(Type propertyType);
public static void ThrowInvalidOperationException_MetadataReferenceOfTypeCannotBeAssignedToType(string referenceId, Type currentType, Type typeToConvert);
public static void ThrowInvalidOperationException_JsonPropertyInfoIsBoundToDifferentJsonTypeInfo(JsonPropertyInfo propertyInfo);
public static void ThrowNotSupportedException_NoMetadataForType(Type type, IJsonTypeInfoResolver resolver);
public static NotSupportedException GetNotSupportedException_AmbiguousMetadataForType(Type type, Type match1, Type match2);
public static void ThrowNotSupportedException_ConstructorContainsNullParameterNames(Type declaringType);
public static void ThrowInvalidOperationException_NoMetadataForType(Type type, IJsonTypeInfoResolver resolver);
public static Exception GetInvalidOperationException_NoMetadataForTypeProperties(IJsonTypeInfoResolver resolver, Type type);
public static void ThrowInvalidOperationException_NoMetadataForTypeProperties(IJsonTypeInfoResolver resolver, Type type);
public static void ThrowMissingMemberException_MissingFSharpCoreMember(string missingFsharpCoreMember);
public static void ThrowNotSupportedException_BaseConverterDoesNotSupportMetadata(Type derivedType);
public static void ThrowNotSupportedException_DerivedConverterDoesNotSupportMetadata(Type derivedType);
public static void ThrowNotSupportedException_RuntimeTypeNotSupported(Type baseType, Type runtimeType);
public static void ThrowNotSupportedException_RuntimeTypeDiamondAmbiguity(Type baseType, Type runtimeType, Type derivedType1, Type derivedType2);
public static void ThrowInvalidOperationException_TypeDoesNotSupportPolymorphism(Type baseType);
public static void ThrowInvalidOperationException_DerivedTypeNotSupported(Type baseType, Type derivedType);
public static void ThrowInvalidOperationException_DerivedTypeIsAlreadySpecified(Type baseType, Type derivedType);
public static void ThrowInvalidOperationException_TypeDicriminatorIdIsAlreadySpecified(Type baseType, object typeDiscriminator);
public static void ThrowInvalidOperationException_InvalidCustomTypeDiscriminatorPropertyName();
public static void ThrowInvalidOperationException_PropertyConflictsWithMetadataPropertyName(Type type, string propertyName);
public static void ThrowInvalidOperationException_PolymorphicTypeConfigurationDoesNotSpecifyDerivedTypes(Type baseType);
public static void ThrowInvalidOperationException_UnsupportedEnumIdentifier(Type enumType, string enumName);
public static void ThrowJsonException_UnrecognizedTypeDiscriminator(object typeDiscriminator);
public static void ThrowArgumentException_JsonPolymorphismOptionsAssociatedWithDifferentJsonTypeInfo(string parameterName);
public static void ThrowOperationCanceledException_PipeWriteCanceled();
public static void ThrowOperationCanceledException_PipeReadCanceled();
public static void ThrowInvalidOperationException_PipeWriterDoesNotImplementUnflushedBytes(PipeWriter pipeWriter);
public static void ThrowNotSupportedException_JsonSchemaExporterDoesNotSupportReferenceHandlerPreserve();
public static void ThrowInvalidOperationException_JsonSchemaExporterDepthTooLarge();
}
}