Update reconfigurable device to prevent writing secrets to local file

This commit is contained in:
Andrew Welker
2021-04-20 11:44:17 -06:00
parent e6f5142fc3
commit d50f8bf6a2

View File

@@ -20,11 +20,16 @@ namespace PepperDash.Essentials.Core.Devices
public DeviceConfig Config { get; private set; }
protected ReconfigurableDevice(DeviceConfig config)
: base(config.Key)
: this(config.Key)
{
SetNameHelper(config);
}
Config = config;
protected ReconfigurableDevice(string key) : base(key)
{
//getting config directly from ConfigReader to avoid the possiblitiy of writing secrets to file
Config = ConfigReader.ConfigObject.GetDeviceForKey(key);
SetNameHelper(Config);
}
/// <summary>