using System; using System.Collections.Generic; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; namespace PepperDash.Essentials { /// /// Factory to create a Mobile Control System Controller /// public class MobileControlDeviceFactory : EssentialsDeviceFactory { /// /// Create the factory for a Mobile Control System Controller /// public MobileControlDeviceFactory() { TypeNames = new List { "appserver", "mobilecontrol", "webserver" }; } /// public override EssentialsDevice BuildDevice(DeviceConfig dc) { try { var props = dc.Properties.ToObject(); return new MobileControlSystemController(dc.Key, dc.Name, props); } catch (Exception e) { Debug.LogMessage(e, "Error building Mobile Control System Controller"); return null; } } } }