Updating more device factories in Essentials and Devices.Common

This commit is contained in:
Neil Dorin
2020-04-20 23:12:27 -06:00
parent 902a94a82c
commit 2170a79399
29 changed files with 645 additions and 629 deletions

View File

@@ -8,11 +8,12 @@ using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.Routing;
namespace PepperDash.Essentials.Devices.Common
{
public class GenericSource : Device, IUiDisplayInfo, IRoutingOutputs, IUsageTracking
public class GenericSource : EssentialsDevice, IUiDisplayInfo, IRoutingOutputs, IUsageTracking
{
public uint DisplayUiType { get { return DisplayUiConstants.TypeNoControls; } }
@@ -39,4 +40,19 @@ namespace PepperDash.Essentials.Devices.Common
#endregion
}
public class GenericSourceFactory : EssentialsDeviceFactory<GenericSource>
{
public GenericSourceFactory()
{
TypeNames = new List<string>() { "genericsource" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new Generic Source Device");
return new GenericSource(dc.Key, dc.Name);
}
}
}