14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
1661
SerializedValueCheckType
defaultCheckType = GetCheckType(contextSpec, propertyGenSpec);
1673
if (defaultCheckType !=
SerializedValueCheckType
.None)
1687
case
SerializedValueCheckType
.Ignore:
1690
case
SerializedValueCheckType
.IgnoreWhenNull:
1701
case
SerializedValueCheckType
.IgnoreWhenDefault:
1712
case
SerializedValueCheckType
.DisallowNull:
1963
private static
SerializedValueCheckType
GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec)
1967
JsonIgnoreCondition.WhenWriting =>
SerializedValueCheckType
.Ignore,
1968
JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.None,
1969
JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.IgnoreWhenDefault,
1970
_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true =>
SerializedValueCheckType
.DisallowNull,
1971
_ =>
SerializedValueCheckType
.None,