14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
1550
SerializedValueCheckType
defaultCheckType = GetCheckType(contextSpec, propertyGenSpec);
1562
if (defaultCheckType !=
SerializedValueCheckType
.None)
1576
case
SerializedValueCheckType
.Ignore:
1579
case
SerializedValueCheckType
.IgnoreWhenNull:
1590
case
SerializedValueCheckType
.IgnoreWhenDefault:
1601
case
SerializedValueCheckType
.DisallowNull:
1841
private static
SerializedValueCheckType
GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec)
1845
JsonIgnoreCondition.WhenWriting =>
SerializedValueCheckType
.Ignore,
1846
JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.None,
1847
JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.IgnoreWhenDefault,
1848
_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true =>
SerializedValueCheckType
.DisallowNull,
1849
_ =>
SerializedValueCheckType
.None,