adds type for EiscApiAdvanced and builder for EiscApi

This commit is contained in:
Andrew Welker
2020-04-20 10:12:09 -06:00
parent 44793f0375
commit 204b3a4d4d

View File

@@ -6,10 +6,11 @@ using Crestron.SimplSharp;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Config;
using PepperDash.Core;
using PepperDash.Essentials.Core.Routing;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Bridges;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.EthernetCommunication;
@@ -21,23 +22,16 @@ namespace PepperDash.Essentials
{
// ? why is this static JTA 2018-06-13?
var key = dc.Key;
var name = dc.Name;
var type = dc.Type;
var properties = dc.Properties;
var propAnon = new { };
var typeName = dc.Type.ToLower();
var groupName = dc.Group.ToLower();
//Debug.Console(2, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString());
if (typeName == "eiscapi")
if (typeName == "eiscapiadv" || typeName == "eiscapiadvanced")
{
return new EiscApi(dc);
return new EiscApiAdvanced(dc);
}
return null;
return typeName == "eiscapi" ? new EiscApi(dc) : null;
}
}