25 references to JsonIgnoreCondition
System.Text.Json.SourceGeneration (25)
JsonSourceGenerator.Emitter.cs (8)
622property.DefaultIgnoreCondition is JsonIgnoreCondition.Always && 629{ DefaultIgnoreCondition: JsonIgnoreCondition.Always } => "null", 638{ DefaultIgnoreCondition: JsonIgnoreCondition.Always } => "null", 1079JsonIgnoreCondition.WhenWriting => SerializedValueCheckType.Ignore, 1080JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.None, 1081JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.IgnoreWhenDefault, 1231if (optionsSpec.DefaultIgnoreCondition is JsonIgnoreCondition defaultIgnoreCondition) 1471private static string FormatIgnoreCondition(JsonIgnoreCondition ignoreCondition)
JsonSourceGenerator.Parser.cs (12)
269JsonIgnoreCondition? defaultIgnoreCondition = null; 329defaultIgnoreCondition = (JsonIgnoreCondition)namedArg.Value.Value!; 1066if (other.DefaultIgnoreCondition == JsonIgnoreCondition.Always) 1077propertySpec.DefaultIgnoreCondition == JsonIgnoreCondition.Always || 1094if (propertySpec.DefaultIgnoreCondition == JsonIgnoreCondition.Always) 1160out JsonIgnoreCondition? ignoreCondition, 1214if (ignoreCondition is not JsonIgnoreCondition.Always) 1226TypeRef propertyTypeRef = ignoreCondition != JsonIgnoreCondition.Always 1265out JsonIgnoreCondition? ignoreCondition, 1308ignoreCondition = JsonIgnoreCondition.Always; 1313ignoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!; 1548if (property.DefaultIgnoreCondition == JsonIgnoreCondition.Always && !property.IsRequired)
Model\PropertyGenerationSpec.cs (3)
111/// The <see cref="JsonIgnoreCondition"/> for the property. 113public required JsonIgnoreCondition? DefaultIgnoreCondition { get; init; } 161if (DefaultIgnoreCondition is JsonIgnoreCondition.Always)
Model\SourceGenerationOptionsSpec.cs (1)
27public required JsonIgnoreCondition? DefaultIgnoreCondition { get; init; }
src\libraries\System.Text.Json\Common\JsonSourceGenerationOptionsAttribute.cs (1)
66public JsonIgnoreCondition DefaultIgnoreCondition { get; set; }