14 references to SerializedValueCheckType
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
1479
SerializedValueCheckType
defaultCheckType = GetCheckType(contextSpec, propertyGenSpec);
1491
if (defaultCheckType !=
SerializedValueCheckType
.None)
1505
case
SerializedValueCheckType
.Ignore:
1508
case
SerializedValueCheckType
.IgnoreWhenNull:
1519
case
SerializedValueCheckType
.IgnoreWhenDefault:
1530
case
SerializedValueCheckType
.DisallowNull:
1770
private static
SerializedValueCheckType
GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec)
1774
JsonIgnoreCondition.WhenWriting =>
SerializedValueCheckType
.Ignore,
1775
JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.None,
1776
JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ?
SerializedValueCheckType
.IgnoreWhenNull :
SerializedValueCheckType
.IgnoreWhenDefault,
1777
_ when propertySpec.IsGetterNonNullableAnnotation && contextSpec.GeneratedOptionsSpec?.RespectNullableAnnotations is true =>
SerializedValueCheckType
.DisallowNull,
1778
_ =>
SerializedValueCheckType
.None,