35[DebuggerDisplay(
"ConverterStrategy.{ConverterStrategy}, {Type.Name}")]
44 public string Name {
get; }
283 if (frame.PropertyRefCache !=
null)
289 if (frame.PropertyRefCache ==
null)
378 if (frame.CtorArgumentState.ParameterRefCache !=
null)
380 num4 += frame.CtorArgumentState.ParameterRefCache.
Count;
384 if (frame.CtorArgumentState.ParameterRefCache ==
null)
429 num |= (ulong)((
long)
length << 56);
430 if (((uint)
length & (
true ? 1
u : 0
u)) != 0)
540 [
RequiresUnreferencedCode(
"JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
546 [
RequiresUnreferencedCode(
"JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
569 bool flag = propertyInfo.IsVirtual();
570 string name = propertyInfo.
Name;
622 if (
converter.ConstructorIsParameterized)
626 int num = parameters.Length;
634 if (
converter.RequiresDynamicMemberAccessors)
642 if (
converter.RequiresDynamicMemberAccessors)
721 if (
value3.DuplicateName !=
null)
740 int num = parameters.Length;
742 for (
int i = 0; i < num; i++)
766 return value.IsVirtual;
811 else if (
type.IsInterface)
847 return type.ContainsGenericParameters;
854 return type.IsByRefLike;
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
int Initialize(int capacity)
void AddRange(IEnumerable< KeyValuePair< TKey, TValue > > collection)
bool TryAdd(TKey key, TValue value)
void Add(TKey key, TValue value)
static byte Min(byte val1, byte val2)
virtual ? MethodInfo GetMethod
virtual ? MethodInfo SetMethod
ParameterInfo[] GetIndexParameters()
static StringComparer OrdinalIgnoreCase
static string Utf8GetString(ReadOnlySpan< byte > bytes)
JsonSerializerContext _context
static Attribute GetAttributeThatCanHaveMultiple(Type classType, Type attributeType, MemberInfo memberInfo)
JsonConverter GetConverterInternal(Type typeToConvert)
MemberAccessor MemberAccessorStrategy
JsonTypeInfo GetOrAddClass(Type type)
bool PropertyNameCaseInsensitive
virtual bool ConstructorIsParameterized
static GenericMethodHolder CreateHolder(Type type)
static JsonParameterInfo CreateIgnoredParameterPlaceholder(JsonParameterInfoValues parameterInfo, JsonPropertyInfo matchingProperty, bool sourceGenMode)
static readonly JsonPropertyInfo s_missingProperty
static JsonPropertyInfo CreateIgnoredPropertyPlaceholder(MemberInfo memberInfo, Type memberType, bool isVirtual, JsonSerializerOptions options)
ConverterStrategy ConverterStrategy
JsonConverter ConverterBase
ParameterLookupKey(string name, Type type)
override bool Equals([NotNullWhen(true)] object obj)
override int GetHashCode()
ParameterLookupValue(JsonPropertyInfo jsonPropertyInfo)
void InitializeConstructorParameters(JsonParameterInfoValues[] jsonParameters, bool sourceGenMode=false)
JsonTypeInfo(Type type, JsonConverter converter, Type runtimeType, JsonSerializerOptions options)
static void ValidateType(Type type, Type parentClassType, MemberInfo memberInfo, JsonSerializerOptions options)
static readonly Type ObjectType
volatile ParameterRef[] _parameterRefsSorted
JsonTypeInfo? KeyTypeInfo
volatile PropertyRef[] _propertyRefsSorted
ConstructorDelegate? CreateObject
object? CreateObjectWithArgs
void UpdateSortedPropertyCache(ref ReadStackFrame frame)
GenericMethodHolder _genericMethods
JsonPropertyInfo PropertyInfoForTypeInfo
GenericMethodHolder GenericMethods
JsonPropertyInfo? DataExtensionProperty
JsonTypeInfo(Type type, JsonSerializerOptions options)
const int PropertyNameCountCacheThreshold
JsonTypeInfo(Type type, JsonSerializerOptions options, bool dummy)
static JsonParameterInfo CreateConstructorParameter(JsonParameterInfoValues parameterInfo, JsonPropertyInfo jsonPropertyInfo, bool sourceGenMode, JsonSerializerOptions options)
Func< JsonSerializerContext, JsonPropertyInfo[]> PropInitFunc
static bool IsPropertyRefEqual(in PropertyRef propertyRef, ReadOnlySpan< byte > propertyName, ulong key)
JsonTypeInfo _elementTypeInfo
JsonTypeInfo? ElementTypeInfo
static bool IsInvalidForSerialization(Type type)
void CacheMember(JsonPropertyInfo jsonPropertyInfo, JsonPropertyDictionary< JsonPropertyInfo > propertyCache, ref Dictionary< string, JsonPropertyInfo > ignoredMembers)
static ulong GetKey(ReadOnlySpan< byte > name)
JsonParameterInfo GetParameter(ReadOnlySpan< byte > propertyName, ref ReadStackFrame frame, out byte[] utf8PropertyName)
JsonPropertyDictionary< JsonParameterInfo > ParameterCache
const int ParameterNameCountCacheThreshold
void UpdateSortedParameterCache(ref ReadStackFrame frame)
Action< Utf8JsonWriter, T > _serialize
static bool PropertyIsOverridenAndIgnored(string currentMemberName, Type currentMemberType, bool currentMemberIsVirtual, Dictionary< string, JsonPropertyInfo > ignoredMembers)
static JsonPropertyInfo AddProperty(MemberInfo memberInfo, Type memberType, Type parentClassType, bool isVirtual, JsonNumberHandling? parentTypeNumberHandling, JsonSerializerOptions options)
static JsonConverter GetConverter(Type type, Type parentClassType, MemberInfo memberInfo, out Type runtimeType, JsonSerializerOptions options)
delegate object ConstructorDelegate()
JsonPropertyInfo GetProperty(ReadOnlySpan< byte > propertyName, ref ReadStackFrame frame, out byte[] utf8PropertyName)
JsonNumberHandling? NumberHandling
void InitializeParameterCache()
static JsonPropertyInfo CreateProperty(Type declaredPropertyType, Type runtimePropertyType, MemberInfo memberInfo, Type parentClassType, bool isVirtual, JsonConverter converter, JsonSerializerOptions options, JsonNumberHandling? parentTypeNumberHandling=null, JsonIgnoreCondition? ignoreCondition=null)
bool IsObjectWithParameterizedCtor
void CacheMember(Type declaringType, Type memberType, MemberInfo memberInfo, bool isVirtual, JsonNumberHandling? typeNumberHandling, ref bool propertyOrderSpecified, ref Dictionary< string, JsonPropertyInfo > ignoredMembers)
void ValidateAndAssignDataExtensionProperty(JsonPropertyInfo jsonPropertyInfo)
const string JsonObjectTypeName
Func< JsonParameterInfoValues[]> CtorParamInitFunc
object? AddMethodDelegate
bool IsValidDataExtensionProperty(JsonPropertyInfo jsonPropertyInfo)
JsonSerializerOptions Options
static JsonParameterInfoValues[] GetParameterInfoArray(ParameterInfo[] parameters)
delegate T ParameterizedConstructorDelegate< T, TArg0, TArg1, TArg2, TArg3 >(TArg0 arg0, TArg1 arg1, TArg2 arg2, TArg3 arg3)
void InitializePropCache()
static bool IsByRefLike(Type type)
JsonTypeInfo _keyTypeInfo
JsonPropertyDictionary< JsonPropertyInfo > PropertyCache
static ? JsonNumberHandling GetNumberHandlingForType(Type type)
const int PropertyNameKeyLength
Action< Utf8JsonWriter, T >? SerializeHandler
static JsonPropertyInfo CreatePropertyInfoForTypeInfo(Type declaredPropertyType, Type runtimePropertyType, JsonConverter converter, JsonNumberHandling? numberHandling, JsonSerializerOptions options)
static bool IsParameterRefEqual(in ParameterRef parameterRef, ReadOnlySpan< byte > parameterName, ulong key)
static void ThrowInvalidOperationException_JsonIncludeOnNonPublicInvalid(string memberName, Type declaringType)
static void ThrowInvalidOperationException_SerializationDuplicateTypeAttribute(Type classType, Type attribute)
static void ThrowInvalidOperationException_CannotSerializeInvalidType(Type type, Type parentClassType, MemberInfo memberInfo)
static void ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid(Type type, JsonPropertyInfo jsonPropertyInfo)
static void ThrowInvalidOperationException_NoMetadataForTypeProperties(JsonSerializerContext context, Type type)
static void ThrowInvalidOperationException_MultiplePropertiesBindToConstructorParameters(Type parentType, string parameterName, string firstMatchName, string secondMatchName)
static void ThrowInvalidOperationException_SerializerPropertyNameConflict(Type type, JsonPropertyInfo jsonPropertyInfo)
static void ThrowInvalidOperationException_NoMetadataForTypeCtorParams(JsonSerializerContext context, Type type)
static void ThrowNotSupportedException_SerializationNotSupported(Type propertyType)
static void ThrowInvalidOperationException_ExtensionDataCannotBindToCtorParam(JsonPropertyInfo jsonPropertyInfo)