log pattern
This commit is contained in:
2023-08-06 23:00:38 -07:00
parent 79b9daedfa
commit e6a70130c7
13 changed files with 756 additions and 455 deletions

25
Models/Name.cs Normal file
View File

@ -0,0 +1,25 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace File_Folder_Helper.Models;
public record Name(string? ForwardSlashFull,
string? Given,
string? Sur,
string? Nick,
string? Suffix)
{
public override string ToString()
{
string result = JsonSerializer.Serialize(this, NameSourceGenerationContext.Default.Name);
return result;
}
}
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
[JsonSerializable(typeof(Name))]
internal partial class NameSourceGenerationContext : JsonSerializerContext
{
}