36 references to JsonIgnoreCondition
System.Text.Json.SourceGeneration (36)
JsonSourceGenerator.Emitter.cs (10)
853property.DefaultIgnoreCondition is JsonIgnoreCondition.Always && 944=> !property.CanUseGetter && property.HasJsonInclude && property.DefaultIgnoreCondition is not JsonIgnoreCondition.Always; 952if (property.IsReadOnly || property.DefaultIgnoreCondition is JsonIgnoreCondition.Always) 987if (property.DefaultIgnoreCondition is JsonIgnoreCondition.Always) 1037if (property.DefaultIgnoreCondition is JsonIgnoreCondition.Always) 1967JsonIgnoreCondition.WhenWriting => SerializedValueCheckType.Ignore, 1968JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.None, 1969JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.IgnoreWhenDefault, 2177if (optionsSpec.DefaultIgnoreCondition is JsonIgnoreCondition defaultIgnoreCondition) 2472private static string FormatIgnoreCondition(JsonIgnoreCondition ignoreCondition)
JsonSourceGenerator.Parser.cs (22)
419JsonIgnoreCondition? defaultIgnoreCondition = null; 480defaultIgnoreCondition = (JsonIgnoreCondition)namedArg.Value.Value!; 717out JsonIgnoreCondition? typeIgnoreCondition, 980out JsonIgnoreCondition? typeIgnoreCondition, 1060typeIgnoreCondition = JsonIgnoreCondition.Always; 1065typeIgnoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!; 1068if (typeIgnoreCondition == JsonIgnoreCondition.Always) 2208JsonIgnoreCondition? typeIgnoreCondition, 2359if (other.DefaultIgnoreCondition == JsonIgnoreCondition.Always) 2370propertySpec.DefaultIgnoreCondition == JsonIgnoreCondition.Always || 2387if (propertySpec.DefaultIgnoreCondition == JsonIgnoreCondition.Always) 2443JsonIgnoreCondition? typeIgnoreCondition, 2459out JsonIgnoreCondition? ignoreCondition, 2473ignoreCondition = typeIgnoreCondition == JsonIgnoreCondition.WhenWritingNull && !memberType.IsNullableType() 2474? JsonIgnoreCondition.Never 2520if (ignoreCondition is not JsonIgnoreCondition.Always) 2541TypeRef propertyTypeRef = ignoreCondition != JsonIgnoreCondition.Always 2545if (ignoreCondition != JsonIgnoreCondition.Always) 2621out JsonIgnoreCondition? ignoreCondition, 2680ignoreCondition = JsonIgnoreCondition.Always; 2685ignoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!; 2938if (property.DefaultIgnoreCondition == JsonIgnoreCondition.Always && !property.IsRequired)
Model\PropertyGenerationSpec.cs (2)
113public required JsonIgnoreCondition? DefaultIgnoreCondition { get; init; } 204if (DefaultIgnoreCondition is JsonIgnoreCondition.Always)
Model\SourceGenerationOptionsSpec.cs (1)
35public required JsonIgnoreCondition? DefaultIgnoreCondition { get; init; }
parent\Common\JsonSourceGenerationOptionsAttribute.cs (1)
73public JsonIgnoreCondition DefaultIgnoreCondition { get; set; }