From c686ee394ddb8d52a476af0f24b028d696bcd8a4 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 10 Nov 2020 10:28:39 -0700 Subject: [PATCH] update event to use delegate --- .../Device Info/IDeviceInfoProvider.cs | 5 ++++- .../Essentials_DM/Endpoints/DGEs/Dge100Controller.cs | 2 +- .../Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Device Info/IDeviceInfoProvider.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Device Info/IDeviceInfoProvider.cs index 081fb46a..8dc7d572 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Device Info/IDeviceInfoProvider.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Device Info/IDeviceInfoProvider.cs @@ -1,4 +1,5 @@ using System; +using PepperDash.Core; namespace PepperDash.Essentials.Core.DeviceInfo { @@ -6,8 +7,10 @@ namespace PepperDash.Essentials.Core.DeviceInfo { DeviceInfo DeviceInfo { get; } - event EventHandler DeviceInfoChanged; + event DeviceInfoChangeHandler DeviceInfoChanged; void UpdateDeviceInfo(); } + + public delegate void DeviceInfoChangeHandler(IKeyed device, DeviceInfoEventArgs args); } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/Dge100Controller.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/Dge100Controller.cs index 06b5f1cf..7e6e085d 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/Dge100Controller.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/DGEs/Dge100Controller.cs @@ -87,7 +87,7 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs public DeviceInfo DeviceInfo { get; private set; } - public event EventHandler DeviceInfoChanged; + public event DeviceInfoChangeHandler DeviceInfoChanged; public void UpdateDeviceInfo() { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs index 54b7ca2c..1931d9cb 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs @@ -89,7 +89,7 @@ namespace PepperDash.Essentials.DM #region Implementation of IDeviceInfoProvider public DeviceInfo DeviceInfo { get; private set; } - public event EventHandler DeviceInfoChanged; + public event DeviceInfoChangeHandler DeviceInfoChanged; public void UpdateDeviceInfo() {