14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
1559
SerializedValueCheckType
defaultCheckType = GetCheckType(contextSpec, propertyGenSpec);
1571
if (defaultCheckType !=
SerializedValueCheckType
.None)
1585
case
SerializedValueCheckType
.Ignore:
1588
case
SerializedValueCheckType
.IgnoreWhenNull:
1599
case
SerializedValueCheckType
.IgnoreWhenDefault:
1610
case
SerializedValueCheckType
.DisallowNull:
1861
private static
SerializedValueCheckType
GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec)
1865
JsonIgnoreCondition.WhenWriting =>
SerializedValueCheckType
.Ignore,
1866
JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.None,
1867
JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.IgnoreWhenDefault,
1868
_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true =>
SerializedValueCheckType
.DisallowNull,
1869
_ =>
SerializedValueCheckType
.None,