mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
update event to use delegate
This commit is contained in:
parent
5076ba405e
commit
c686ee394d
3 changed files with 6 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.DeviceInfo
|
namespace PepperDash.Essentials.Core.DeviceInfo
|
||||||
{
|
{
|
||||||
|
|
@ -6,8 +7,10 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||||
{
|
{
|
||||||
DeviceInfo DeviceInfo { get; }
|
DeviceInfo DeviceInfo { get; }
|
||||||
|
|
||||||
event EventHandler<DeviceInfoEventArgs> DeviceInfoChanged;
|
event DeviceInfoChangeHandler DeviceInfoChanged;
|
||||||
|
|
||||||
void UpdateDeviceInfo();
|
void UpdateDeviceInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public delegate void DeviceInfoChangeHandler(IKeyed device, DeviceInfoEventArgs args);
|
||||||
}
|
}
|
||||||
|
|
@ -87,7 +87,7 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
||||||
|
|
||||||
public DeviceInfo DeviceInfo { get; private set; }
|
public DeviceInfo DeviceInfo { get; private set; }
|
||||||
|
|
||||||
public event EventHandler<DeviceInfoEventArgs> DeviceInfoChanged;
|
public event DeviceInfoChangeHandler DeviceInfoChanged;
|
||||||
|
|
||||||
public void UpdateDeviceInfo()
|
public void UpdateDeviceInfo()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ namespace PepperDash.Essentials.DM
|
||||||
#region Implementation of IDeviceInfoProvider
|
#region Implementation of IDeviceInfoProvider
|
||||||
|
|
||||||
public DeviceInfo DeviceInfo { get; private set; }
|
public DeviceInfo DeviceInfo { get; private set; }
|
||||||
public event EventHandler<DeviceInfoEventArgs> DeviceInfoChanged;
|
public event DeviceInfoChangeHandler DeviceInfoChanged;
|
||||||
|
|
||||||
public void UpdateDeviceInfo()
|
public void UpdateDeviceInfo()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue