From 4360dcdca94cdf46f7adf0f8513745bbd8063670 Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Thu, 2 Jul 2020 15:36:59 -0500 Subject: [PATCH] Update C2nRthsController to use IHasCresnetBranches Interface Inprogress #297 --- .../Crestron IO/C2nRts/C2nRthsController.cs | 4 ++-- .../Crestron IO/DinCenCn/DinCenCnController.cs | 8 +------- .../Crestron IO/DinCenCn/IHasCresnetBranches.cs | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs index 8416efac..e1aa545e 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/C2nRts/C2nRthsController.cs @@ -118,12 +118,12 @@ namespace PepperDash.Essentials.Core.CrestronIO Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey); return new C2nRths(cresnetId, Global.ControlSystem); } - var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as ICresnetBridge; + var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches; if (cresnetBridge != null) { Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey); - return new C2nRths(cresnetId, cresnetBridge.Branches[branchId]); + return new C2nRths(cresnetId, cresnetBridge.CresnetBranches[branchId]); } Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey); return null; diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/DinCenCnController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/DinCenCnController.cs index c3ce095f..68fedc82 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/DinCenCnController.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/DinCenCnController.cs @@ -1,15 +1,9 @@ -using System; -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.GeneralIO; -using Newtonsoft.Json; using PepperDash.Core; -using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Config; -using System.Linq; -using PepperDash_Essentials_Core.Crestron_IO.DinCenCn; namespace PepperDash.Essentials.Core diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/IHasCresnetBranches.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/IHasCresnetBranches.cs index da5281b4..11e1b707 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/IHasCresnetBranches.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Crestron IO/DinCenCn/IHasCresnetBranches.cs @@ -6,7 +6,7 @@ using Crestron.SimplSharp; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; -namespace PepperDash_Essentials_Core.Crestron_IO.DinCenCn +namespace PepperDash.Essentials.Core { public interface IHasCresnetBranches {