System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (47)
80/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification.
111/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification.
141/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification.
171/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification.
207/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification.
293/// <paramref name="value" /> has been associated with a different <see cref="JsonTypeInfo"/> instance.
296/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification.
345/// A <see cref="JsonTypeInfo"/> instance can be locked either if
395private readonly JsonTypeInfo _parent;
397public JsonUnionCaseInfoList(JsonTypeInfo parent, IEnumerable<JsonUnionCaseInfo>? source = null) : base(source)
463/// <c>CaseValue</c> using the <see cref="JsonTypeInfo"/> registered for that case
641internal JsonTypeInfo? ElementTypeInfo
651JsonTypeInfo? elementTypeInfo = _elementTypeInfo;
667internal JsonTypeInfo? KeyTypeInfo
677JsonTypeInfo? keyTypeInfo = _keyTypeInfo;
689private JsonTypeInfo? _elementTypeInfo;
690private JsonTypeInfo? _keyTypeInfo;
693/// Gets the <see cref="JsonSerializerOptions"/> value associated with the current <see cref="JsonTypeInfo" /> instance.
708/// As such, the value of the converter cannot be changed once a <see cref="JsonTypeInfo"/> instance has been created.
728/// Dummy <see cref="JsonPropertyInfo"/> instance corresponding to the declaring type of this <see cref="JsonTypeInfo"/>.
746/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification.
778/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification.
822/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification.
860/// The <see cref="JsonTypeInfo"/> instance has been locked for further modification.
1058/// Validates that a union <see cref="JsonTypeInfo"/> has a well-formed shape after
1180/// This helper operates purely on already-resolved <see cref="JsonTypeInfo"/> /
1185private static void BuildUnionValueTypeMap(IList<JsonUnionCaseInfo> unionCases, JsonSerializerOptions options, JsonTypeInfo target)
1194JsonTypeInfo caseTypeInfo = options.GetTypeInfoInternal(caseType);
1266internal JsonTypeInfo? AncestorPolymorphicType
1283private JsonTypeInfo? _ancestorPolymorhicType;
1383/// which constrains the type of metadata that can be modified in the <see cref="JsonTypeInfo"/> instance.
1396/// Creates a blank <see cref="JsonTypeInfo"/> instance.
1400/// <returns>A blank <see cref="JsonTypeInfo"/> instance.</returns>
1404/// The returned <see cref="JsonTypeInfo"/> will be blank, with the exception of the
1411/// which constrains the type of metadata that can be modified in the <see cref="JsonTypeInfo"/> instance.
1415public static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonSerializerOptions options)
1431internal static JsonTypeInfo CreateJsonTypeInfo(Type type, JsonConverter converter, JsonSerializerOptions options)
1433JsonTypeInfo jsonTypeInfo;
1444jsonTypeInfo = (JsonTypeInfo)jsonTypeInfoType.CreateInstanceNoWrapExceptions(
1454/// Creates a blank <see cref="JsonPropertyInfo"/> instance for the current <see cref="JsonTypeInfo"/>.
1461/// <exception cref="InvalidOperationException">The <see cref="JsonTypeInfo"/> instance has been locked for further modification.</exception>
1487if (Options.TryGetTypeInfoCached(propertyType, out JsonTypeInfo? jsonTypeInfo))
1500parameterTypes: [typeof(Type), typeof(JsonTypeInfo), typeof(JsonSerializerOptions)],
1511private protected abstract JsonPropertyInfo CreateJsonPropertyInfo(JsonTypeInfo declaringTypeInfo, Type? declaringType, JsonSerializerOptions options);
1793(propertyType.FullName == JsonObjectTypeName && ReferenceEquals(propertyType.Assembly, typeof(JsonTypeInfo).Assembly));
1827private readonly JsonTypeInfo _jsonTypeInfo;
1829public JsonPropertyInfoList(JsonTypeInfo jsonTypeInfo)
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (7)
38JsonTypeInfo.ObjectType,
176public override JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>?
178CreateDelegate<JsonTypeInfo.ParameterizedConstructorDelegate<T, TArg0, TArg1, TArg2, TArg3>>(
201new[] { JsonTypeInfo.ObjectType },
347new[] { collectionType, JsonTypeInfo.ObjectType },
700new[] { JsonTypeInfo.ObjectType },
716new[] { JsonTypeInfo.ObjectType, memberType },