From 95c6d973025cb0177a931681bff2d860d8011951 Mon Sep 17 00:00:00 2001 From: Gerard Braad Date: Thu, 11 Mar 2021 17:41:29 +0800 Subject: [PATCH] #39 Add missing accessors to JSON struct Signed-off-by: Gerard Braad --- DaemonCommander/ResponseClasses.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/DaemonCommander/ResponseClasses.cs b/DaemonCommander/ResponseClasses.cs index 163280f..10b5836 100755 --- a/DaemonCommander/ResponseClasses.cs +++ b/DaemonCommander/ResponseClasses.cs @@ -72,10 +72,17 @@ public class VersionResult struct Config { - public string bundle; - public int cpus; - public string nameserver; - public int memory; + [JsonPropertyName("bundle")] + public string bundle { get; set; } + + [JsonPropertyName("cpus")] + public int cpus { get; set; } + + [JsonPropertyName("nameserver")] + public string nameserver { get; set; } + + [JsonPropertyName("memory")] + public int memory { get; set; } [JsonPropertyName("disable-update-check")] public bool DisableUpdateCheck { get; set; } @@ -117,7 +124,7 @@ struct Config public bool SkipCheckHypervInstalled { get; set; } [JsonPropertyName("skip-check-hyperv-service-running")] - public bool SkipCheckHypervServiceRunning; + public bool SkipCheckHypervServiceRunning { get; set; } [JsonPropertyName("skip-check-hyperv-switch")] public bool SkipCheckHypervSwitch { get; set; }