private record

This commit is contained in:
2024-10-19 09:32:22 -07:00
parent 0ee1846c72
commit 19326df4c6
27 changed files with 206 additions and 168 deletions

View File

@ -1,20 +1,20 @@
using System.Text.Json.Serialization;
// using System.Text.Json.Serialization;
namespace File_Folder_Helper.Models;
// namespace File_Folder_Helper.Models;
public record Host([property: JsonPropertyName("a")] string? Id,
[property: JsonPropertyName("b")] string? Colon,
[property: JsonPropertyName("c")] string? Hyphen,
[property: JsonPropertyName("d")] string? Line,
[property: JsonPropertyName("e")] string? Count,
[property: JsonPropertyName("f")] string? Segments,
[property: JsonPropertyName("g")] string? Type,
[property: JsonPropertyName("h")] string? Device,
[property: JsonPropertyName("i")] string? Name,
[property: JsonPropertyName("j")] string? Location);
// internal record Host([property: JsonPropertyName("a")] string? Id,
// [property: JsonPropertyName("b")] string? Colon,
// [property: JsonPropertyName("c")] string? Hyphen,
// [property: JsonPropertyName("d")] string? Line,
// [property: JsonPropertyName("e")] string? Count,
// [property: JsonPropertyName("f")] string? Segments,
// [property: JsonPropertyName("g")] string? Type,
// [property: JsonPropertyName("h")] string? Device,
// [property: JsonPropertyName("i")] string? Name,
// [property: JsonPropertyName("j")] string? Location);
[JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
[JsonSerializable(typeof(Host[]))]
public partial class HostSourceGenerationContext : JsonSerializerContext
{
}
// [JsonSourceGenerationOptions(WriteIndented = true, AllowTrailingCommas = true)]
// [JsonSerializable(typeof(Host[]))]
// internal partial class HostsSourceGenerationContext : JsonSerializerContext
// {
// }