mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-13 12:37:07 +00:00
Updating more device factories in Essentials and Devices.Common
This commit is contained in:
parent
902a94a82c
commit
2170a79399
29 changed files with 645 additions and 629 deletions
|
|
@ -16,23 +16,20 @@ using Crestron.SimplSharpPro.EthernetCommunication;
|
|||
|
||||
namespace PepperDash.Essentials
|
||||
{
|
||||
/// <summary>
|
||||
/// Responsible for loading all of the device types for this library
|
||||
/// </summary>
|
||||
public class BridgeFactory
|
||||
{
|
||||
public static IKeyed GetDevice(DeviceConfig dc)
|
||||
public BridgeFactory()
|
||||
{
|
||||
// ? why is this static JTA 2018-06-13?
|
||||
var eiscApiAdvancedFactory = new EiscApiAdvancedFactory() as IDeviceFactory;
|
||||
eiscApiAdvancedFactory.LoadTypeFactories();
|
||||
|
||||
var typeName = dc.Type.ToLower();
|
||||
|
||||
//Debug.Console(2, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString());
|
||||
|
||||
if (typeName == "eiscapiadv" || typeName == "eiscapiadvanced")
|
||||
{
|
||||
return new EiscApiAdvanced(dc);
|
||||
}
|
||||
|
||||
return typeName == "eiscapi" ? new EiscApi(dc) : null;
|
||||
var eiscApiFactory = new EiscApiFactory() as IDeviceFactory;
|
||||
eiscApiFactory.LoadTypeFactories();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue