#658 Initializes config properties in constructor(s)

This commit is contained in:
Neil Dorin
2021-03-17 10:52:17 -06:00
parent fcdee3b9fd
commit 6ab4d4d090
2 changed files with 17 additions and 0 deletions

View File

@@ -29,6 +29,16 @@ namespace PepperDash.Essentials.Core.Config
[JsonProperty("joinMaps")]
public Dictionary<string, JObject> JoinMaps { get; set; }
public BasicConfig()
{
Info = new InfoConfig();
Devices = new List<DeviceConfig>();
SourceLists = new Dictionary<string, Dictionary<string, SourceListItem>>();
DestinationLists = new Dictionary<string, Dictionary<string, DestinationListItem>>();
TieLines = new List<TieLineConfig>();
JoinMaps = new Dictionary<string, JObject>();
}
/// <summary>
/// Checks SourceLists for a given list and returns it if found. Otherwise, returns null
/// </summary>

View File

@@ -51,6 +51,13 @@ namespace PepperDash.Essentials.Core.Config
[JsonProperty("rooms")]
public List<DeviceConfig> Rooms { get; set; }
public EssentialsConfig()
: base()
{
Rooms = new List<DeviceConfig>();
}
}
/// <summary>