mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-11 10:45:00 +00:00
- moved files into folders to match their current namespace - did not update any namespaces to maintain backward compatibility
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using PepperDash.Core;
|
|
using PepperDash.Essentials.Core.Config;
|
|
|
|
namespace PepperDash.Essentials.Core.CrestronIO.Cards
|
|
{
|
|
public class InternalCardCageControllerFactory : EssentialsDeviceFactory<InternalCardCageController>
|
|
{
|
|
public InternalCardCageControllerFactory()
|
|
{
|
|
TypeNames = new List<string> {"internalcardcage"};
|
|
}
|
|
#region Overrides of EssentialsDeviceFactory<InternalCardCageController>
|
|
|
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
|
{
|
|
Debug.Console(1, "Factory attempting to build new Internal Card Cage Controller");
|
|
|
|
if (!Global.ControlSystem.SupportsThreeSeriesPlugInCards)
|
|
{
|
|
Debug.Console(0, Debug.ErrorLogLevel.Warning, "Current control system does NOT support 3-Series cards. Everything is NOT awesome.");
|
|
return null;
|
|
}
|
|
|
|
var config = dc.Properties.ToObject<InternalCardCageConfiguration>();
|
|
|
|
return new InternalCardCageController(dc.Key, dc.Name, config);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |