14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
1588
SerializedValueCheckType
defaultCheckType = GetCheckType(contextSpec, propertyGenSpec);
1600
if (defaultCheckType !=
SerializedValueCheckType
.None)
1614
case
SerializedValueCheckType
.Ignore:
1617
case
SerializedValueCheckType
.IgnoreWhenNull:
1628
case
SerializedValueCheckType
.IgnoreWhenDefault:
1639
case
SerializedValueCheckType
.DisallowNull:
1890
private static
SerializedValueCheckType
GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec)
1894
JsonIgnoreCondition.WhenWriting =>
SerializedValueCheckType
.Ignore,
1895
JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.None,
1896
JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.IgnoreWhenDefault,
1897
_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true =>
SerializedValueCheckType
.DisallowNull,
1898
_ =>
SerializedValueCheckType
.None,