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)
385JsonIgnoreCondition? defaultIgnoreCondition = null; 446defaultIgnoreCondition = (JsonIgnoreCondition)namedArg.Value.Value!; 683out JsonIgnoreCondition? typeIgnoreCondition, 946out JsonIgnoreCondition? typeIgnoreCondition, 1026typeIgnoreCondition = JsonIgnoreCondition.Always; 1031typeIgnoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!; 1034if (typeIgnoreCondition == JsonIgnoreCondition.Always) 2175JsonIgnoreCondition? typeIgnoreCondition, 2326if (other.DefaultIgnoreCondition == JsonIgnoreCondition.Always) 2337propertySpec.DefaultIgnoreCondition == JsonIgnoreCondition.Always || 2354if (propertySpec.DefaultIgnoreCondition == JsonIgnoreCondition.Always) 2410JsonIgnoreCondition? typeIgnoreCondition, 2426out JsonIgnoreCondition? ignoreCondition, 2440ignoreCondition = typeIgnoreCondition == JsonIgnoreCondition.WhenWritingNull && !memberType.IsNullableType() 2441? JsonIgnoreCondition.Never 2487if (ignoreCondition is not JsonIgnoreCondition.Always) 2508TypeRef propertyTypeRef = ignoreCondition != JsonIgnoreCondition.Always 2512if (ignoreCondition != JsonIgnoreCondition.Always) 2588out JsonIgnoreCondition? ignoreCondition, 2647ignoreCondition = JsonIgnoreCondition.Always; 2652ignoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!; 2905if (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; }