mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
Update reconfigurable device to prevent writing secrets to local file
This commit is contained in:
parent
e6f5142fc3
commit
d50f8bf6a2
1 changed files with 8 additions and 3 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue