refactor: remove unused GetInterfaces method and streamline constructor initialization

This commit is contained in:
Neil Dorin 2026-06-10 22:58:57 -06:00
parent 72c948e760
commit c306fd717e

View file

@ -84,19 +84,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
: this(key, messagePath) : this(key, messagePath)
{ {
_device = device; _device = device;
_deviceInterfaces = GetInterfaces(_device as Device);
} }
/// <summary>
/// Gets the interfaces implmented on the device
/// </summary>
/// <param name="device"></param>
/// <returns></returns>
private List<string> GetInterfaces(Device device)
{
return device?.GetType().GetInterfaces().Select((i) => i.Name).ToList() ?? new List<string>();
}
/// <summary> /// <summary>
/// Registers this messenger with appserver controller /// Registers this messenger with appserver controller
@ -262,6 +251,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
message.Name = _device.Name; message.Name = _device.Name;
message.MessageBasePath = MessagePath;
var token = JToken.FromObject(message); var token = JToken.FromObject(message);
PostStatusMessage(token, MessagePath, clientId); PostStatusMessage(token, MessagePath, clientId);