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);
49
ThrowHelper.ThrowInvalidOperationException_DerivedTypeIsAlreadySpecified(
BaseType
, derivedType);
56
ThrowHelper.ThrowInvalidOperationException_TypeDicriminatorIdIsAlreadySpecified(
BaseType
, typeDiscriminator);
67
ThrowHelper.ThrowInvalidOperationException_PolymorphicTypeConfigurationDoesNotSpecifyDerivedTypes(
BaseType
);
74
ThrowHelper.ThrowNotSupportedException_BaseConverterDoesNotSupportMetadata(
BaseType
);
103
Debug.Assert(
BaseType
.IsAssignableFrom(runtimeType));
117
_typeToDiscriminatorId.TryGetValue(
BaseType
, out result);
123
if (runtimeType !=
BaseType
)
125
ThrowHelper.ThrowNotSupportedException_RuntimeTypeNotSupported(
BaseType
, runtimeType);
184
Debug.Assert(
BaseType
.IsAssignableFrom(type));
187
if (type ==
BaseType
)
195
for (Type? candidate = type.BaseType;
BaseType
.IsAssignableFrom(candidate); candidate = candidate.BaseType)
207
if (
BaseType
.IsInterface)
211
if (interfaceTy !=
BaseType
&&
BaseType
.IsAssignableFrom(interfaceTy) &&
221
ThrowHelper.ThrowNotSupportedException_RuntimeTypeDiamondAmbiguity(
BaseType
, type, result.DerivedType, interfaceResult.DerivedType);