36 references to JsonIgnoreCondition
System.Text.Json.SourceGeneration (36)
JsonSourceGenerator.Emitter.cs (10)
641property.DefaultIgnoreCondition is JsonIgnoreCondition.Always && 732=> !property.CanUseGetter && property.HasJsonInclude && property.DefaultIgnoreCondition is not JsonIgnoreCondition.Always; 740if (property.DefaultIgnoreCondition is JsonIgnoreCondition.Always) 768if (property.DefaultIgnoreCondition is JsonIgnoreCondition.Always) 813if (property.DefaultIgnoreCondition is JsonIgnoreCondition.Always) 1664JsonIgnoreCondition.WhenWriting => SerializedValueCheckType.Ignore, 1665JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.None, 1666JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.IgnoreWhenDefault, 1822if (optionsSpec.DefaultIgnoreCondition is JsonIgnoreCondition defaultIgnoreCondition) 2063private static string FormatIgnoreCondition(JsonIgnoreCondition ignoreCondition)
JsonSourceGenerator.Parser.cs (21)
335JsonIgnoreCondition? defaultIgnoreCondition = null; 395defaultIgnoreCondition = (JsonIgnoreCondition)namedArg.Value.Value!; 601out JsonIgnoreCondition? typeIgnoreCondition, 770out JsonIgnoreCondition? typeIgnoreCondition, 831typeIgnoreCondition = JsonIgnoreCondition.Always; 836typeIgnoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!; 839if (typeIgnoreCondition == JsonIgnoreCondition.Always) 1040JsonIgnoreCondition? typeIgnoreCondition, 1189if (other.DefaultIgnoreCondition == JsonIgnoreCondition.Always) 1200propertySpec.DefaultIgnoreCondition == JsonIgnoreCondition.Always || 1217if (propertySpec.DefaultIgnoreCondition == JsonIgnoreCondition.Always) 1272JsonIgnoreCondition? typeIgnoreCondition, 1286out JsonIgnoreCondition? ignoreCondition, 1300ignoreCondition = typeIgnoreCondition == JsonIgnoreCondition.WhenWritingNull && !memberType.IsNullableType() 1301? JsonIgnoreCondition.Never 1351if (ignoreCondition is not JsonIgnoreCondition.Always) 1372TypeRef propertyTypeRef = ignoreCondition != JsonIgnoreCondition.Always 1426out JsonIgnoreCondition? ignoreCondition, 1485ignoreCondition = JsonIgnoreCondition.Always; 1490ignoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!; 1741if (property.DefaultIgnoreCondition == JsonIgnoreCondition.Always && !property.IsRequired)
Model\PropertyGenerationSpec.cs (3)
111/// The <see cref="JsonIgnoreCondition"/> for the property. 113public required JsonIgnoreCondition? DefaultIgnoreCondition { get; init; } 195if (DefaultIgnoreCondition is JsonIgnoreCondition.Always)
Model\SourceGenerationOptionsSpec.cs (1)
27public required JsonIgnoreCondition? DefaultIgnoreCondition { get; init; }
src\libraries\System.Text.Json\Common\JsonSourceGenerationOptionsAttribute.cs (1)
73public JsonIgnoreCondition DefaultIgnoreCondition { get; set; }