mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
refactor: make messenger constructors more consistent
Some constructors for messengers were taking Device rather than the specific type they needed.
This commit is contained in:
@@ -11,7 +11,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||
protected ILightingScenes Device { get; private set; }
|
||||
|
||||
public ILightingScenesMessenger(string key, ILightingScenes device, string messagePath)
|
||||
: base(key, messagePath, device as Device)
|
||||
: base(key, messagePath, device as IKeyName)
|
||||
{
|
||||
Device = device ?? throw new ArgumentNullException("device");
|
||||
Device.LightingSceneChange += new EventHandler<LightingSceneChangeEventArgs>(LightingDevice_LightingSceneChange);
|
||||
|
||||
Reference in New Issue
Block a user