finalize model for option sets
This commit is contained in:
@@ -1,8 +1,21 @@
|
||||
namespace ModpackUpdater;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel;
|
||||
|
||||
public class InstallOption
|
||||
namespace ModpackUpdater;
|
||||
|
||||
public class InstallOption : IActionSet
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public List<InstallAction> InstallActions { get; } = [];
|
||||
|
||||
[DefaultValue(null)]
|
||||
public string Description { get; set; }
|
||||
|
||||
[DefaultValue(Side.Both)]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public Side Side { get; set; } = Side.Both;
|
||||
|
||||
public List<UpdateAction> UninstallActions { get; } = [];
|
||||
|
||||
IEnumerable<InstallAction> IActionSet.Actions => UninstallActions.Cast<InstallAction>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user