Compare commits

...

1 Commits

Author SHA1 Message Date
Andrew Welker
d50f8bf6a2 Update reconfigurable device to prevent writing secrets to local file 2021-04-20 11:44:17 -06:00

View File

@@ -20,11 +20,16 @@ namespace PepperDash.Essentials.Core.Devices
public DeviceConfig Config { get; private set; } public DeviceConfig Config { get; private set; }
protected ReconfigurableDevice(DeviceConfig config) 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> /// <summary>