using System.Text.Json; using System.Text.Json.Serialization; namespace File_Folder_Helper.Models; public record VSCodeTask([property: JsonPropertyName("label")] string? Label, [property: JsonPropertyName("command")] string? Command, [property: JsonPropertyName("type")] string? Type, [property: JsonPropertyName("args")] IReadOnlyList? Arguments, [property: JsonPropertyName("script")] string? Script) { public override string ToString() { string result = JsonSerializer.Serialize(this, VSCodeTaskSourceGenerationContext.Default.VSCodeTask); return result; } } [JsonSourceGenerationOptions(WriteIndented = true, PropertyNameCaseInsensitive = true)] [JsonSerializable(typeof(VSCodeTask))] internal partial class VSCodeTaskSourceGenerationContext : JsonSerializerContext { } public record VSCodeTasks([property: JsonPropertyName("version")] string? Version, [property: JsonPropertyName("tasks")] VSCodeTask[]? TaskCollection) { public override string ToString() { string result = JsonSerializer.Serialize(this, VSCodeTasksSourceGenerationContext.Default.VSCodeTasks); return result; } } [JsonSourceGenerationOptions(WriteIndented = true, PropertyNameCaseInsensitive = true)] [JsonSerializable(typeof(VSCodeTasks))] internal partial class VSCodeTasksSourceGenerationContext : JsonSerializerContext { }