Alignment with AA
This commit is contained in:
@ -3,23 +3,19 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace View_by_Distance.Shared.Models;
|
||||
|
||||
public class PersonBirthday : Properties.IPersonBirthday
|
||||
public record PersonBirthday(DateTime Value)
|
||||
{
|
||||
|
||||
protected readonly DateTime _Value; // {{1}}SingletonValue
|
||||
|
||||
public DateTime Value => _Value; // {{1}}SingletonValue
|
||||
|
||||
[JsonConstructor]
|
||||
public PersonBirthday
|
||||
(
|
||||
DateTime value
|
||||
) => _Value = value; // {{1}}SingletonValue
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
||||
string result = JsonSerializer.Serialize(this, PersonBirthdaySourceGenerationContext.Default.PersonBirthday);
|
||||
return result;
|
||||
} // ...
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
[JsonSerializable(typeof(PersonBirthday))]
|
||||
public partial class PersonBirthdaySourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user