1 write to BaseType
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
26
BaseType
= baseType;
19 references to BaseType
System.Text.Json (19)
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (19)
29
if (!IsSupportedPolymorphicBaseType(
BaseType
))
31
ThrowHelper.ThrowInvalidOperationException_TypeDoesNotSupportPolymorphism(
BaseType
);
39
if (!IsSupportedDerivedType(
BaseType
, derivedType) ||
42
ThrowHelper.ThrowInvalidOperationException_DerivedTypeNotSupported(
BaseType
, derivedType);
50
ThrowHelper.ThrowInvalidOperationException_DerivedTypeIsAlreadySpecified(
BaseType
, derivedType);
57
ThrowHelper.ThrowInvalidOperationException_TypeDicriminatorIdIsAlreadySpecified(
BaseType
, typeDiscriminator);
68
ThrowHelper.ThrowInvalidOperationException_PolymorphicTypeConfigurationDoesNotSpecifyDerivedTypes(
BaseType
);
77
ThrowHelper.ThrowNotSupportedException_BaseConverterDoesNotSupportMetadata(
BaseType
);
121
Debug.Assert(
BaseType
.IsAssignableFrom(runtimeType));
135
_typeToDiscriminatorId.TryGetValue(
BaseType
, out result);
141
if (runtimeType !=
BaseType
)
143
ThrowHelper.ThrowNotSupportedException_RuntimeTypeNotSupported(
BaseType
, runtimeType);
202
Debug.Assert(
BaseType
.IsAssignableFrom(type));
205
if (type ==
BaseType
)
213
for (Type? candidate = type.BaseType;
BaseType
.IsAssignableFrom(candidate); candidate = candidate.BaseType)
225
if (
BaseType
.IsInterface)
229
if (interfaceTy !=
BaseType
&&
BaseType
.IsAssignableFrom(interfaceTy) &&
239
ThrowHelper.ThrowNotSupportedException_RuntimeTypeDiamondAmbiguity(
BaseType
, type, result.JsonTypeInfo.Type, interfaceResult.JsonTypeInfo.Type);