14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
1576
SerializedValueCheckType
defaultCheckType = GetCheckType(contextSpec, propertyGenSpec);
1588
if (defaultCheckType !=
SerializedValueCheckType
.None)
1602
case
SerializedValueCheckType
.Ignore:
1605
case
SerializedValueCheckType
.IgnoreWhenNull:
1616
case
SerializedValueCheckType
.IgnoreWhenDefault:
1627
case
SerializedValueCheckType
.DisallowNull:
1878
private static
SerializedValueCheckType
GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec)
1882
JsonIgnoreCondition.WhenWriting =>
SerializedValueCheckType
.Ignore,
1883
JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.None,
1884
JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.IgnoreWhenDefault,
1885
_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true =>
SerializedValueCheckType
.DisallowNull,
1886
_ =>
SerializedValueCheckType
.None,