14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
1367
SerializedValueCheckType
defaultCheckType = GetCheckType(contextSpec, propertyGenSpec);
1379
if (defaultCheckType !=
SerializedValueCheckType
.None)
1393
case
SerializedValueCheckType
.Ignore:
1396
case
SerializedValueCheckType
.IgnoreWhenNull:
1407
case
SerializedValueCheckType
.IgnoreWhenDefault:
1418
case
SerializedValueCheckType
.DisallowNull:
1660
private static
SerializedValueCheckType
GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec)
1664
JsonIgnoreCondition.WhenWriting =>
SerializedValueCheckType
.Ignore,
1665
JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.None,
1666
JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.IgnoreWhenDefault,
1667
_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true =>
SerializedValueCheckType
.DisallowNull,
1668
_ =>
SerializedValueCheckType
.None,