string enum converter for AddressType and Type
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace Pilz.Updating;
|
||||
|
||||
@@ -8,9 +9,10 @@ public class UpdatePackageInfo(AppVersion version, string address)
|
||||
public AppVersion Version { get; set; } = version;
|
||||
public UpdateNotes Notes { get; } = new();
|
||||
public string Address { get; set; } = address;
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public PackageAddressType AddressType { get; set; }
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public PackageType Type { get; set; }
|
||||
|
||||
[Obsolete, JsonProperty]
|
||||
private string Packagelink => Address;
|
||||
}
|
||||
Reference in New Issue
Block a user