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.DefaultIgnoreCondition is JsonIgnoreCondition.Always) 980if (property.DefaultIgnoreCondition is JsonIgnoreCondition.Always) 1025if (property.DefaultIgnoreCondition is JsonIgnoreCondition.Always) 1885JsonIgnoreCondition.WhenWriting => SerializedValueCheckType.Ignore, 1886JsonIgnoreCondition.WhenWritingNull => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.None, 1887JsonIgnoreCondition.WhenWritingDefault => propertySpec.PropertyType.CanBeNull ? SerializedValueCheckType.IgnoreWhenNull : SerializedValueCheckType.IgnoreWhenDefault, 2095if (optionsSpec.DefaultIgnoreCondition is JsonIgnoreCondition defaultIgnoreCondition) 2390private static string FormatIgnoreCondition(JsonIgnoreCondition ignoreCondition)
JsonSourceGenerator.Parser.cs (22)
414JsonIgnoreCondition? defaultIgnoreCondition = null; 475defaultIgnoreCondition = (JsonIgnoreCondition)namedArg.Value.Value!; 712out JsonIgnoreCondition? typeIgnoreCondition, 967out JsonIgnoreCondition? typeIgnoreCondition, 1047typeIgnoreCondition = JsonIgnoreCondition.Always; 1052typeIgnoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!; 1055if (typeIgnoreCondition == JsonIgnoreCondition.Always) 2195JsonIgnoreCondition? typeIgnoreCondition, 2343if (other.DefaultIgnoreCondition == JsonIgnoreCondition.Always) 2354propertySpec.DefaultIgnoreCondition == JsonIgnoreCondition.Always || 2371if (propertySpec.DefaultIgnoreCondition == JsonIgnoreCondition.Always) 2426JsonIgnoreCondition? typeIgnoreCondition, 2442out JsonIgnoreCondition? ignoreCondition, 2456ignoreCondition = typeIgnoreCondition == JsonIgnoreCondition.WhenWritingNull && !memberType.IsNullableType() 2457? JsonIgnoreCondition.Never 2503if (ignoreCondition is not JsonIgnoreCondition.Always) 2524TypeRef propertyTypeRef = ignoreCondition != JsonIgnoreCondition.Always 2528if (ignoreCondition != JsonIgnoreCondition.Always) 2599out JsonIgnoreCondition? ignoreCondition, 2658ignoreCondition = JsonIgnoreCondition.Always; 2663ignoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!; 2914if (property.DefaultIgnoreCondition == JsonIgnoreCondition.Always && !property.IsRequired)
Model\PropertyGenerationSpec.cs (2)
113public required JsonIgnoreCondition? DefaultIgnoreCondition { get; init; } 195if (DefaultIgnoreCondition is JsonIgnoreCondition.Always)
Model\SourceGenerationOptionsSpec.cs (1)
35public required JsonIgnoreCondition? DefaultIgnoreCondition { get; init; }
parent\Common\JsonSourceGenerationOptionsAttribute.cs (1)
73public JsonIgnoreCondition DefaultIgnoreCondition { get; set; }