From 4b37d68c0ec5c76d3da9fcceece8d43bfc48843a Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 5 May 2020 17:12:49 -0600 Subject: [PATCH] Refactors HDBaseTRxController chagnes InputPorts and OutputPorts to not return a new collection every time they are accessed --- .../Receivers/DmHdBaseTEndpointController.cs | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmHdBaseTEndpointController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmHdBaseTEndpointController.cs index 6332b853..3af4f0fe 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmHdBaseTEndpointController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmHdBaseTEndpointController.cs @@ -1,4 +1,5 @@ -using Crestron.SimplSharpPro; +using Crestron.SimplSharp.Ssh; +using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DM.Endpoints.Receivers; using PepperDash.Essentials.Core; @@ -6,32 +7,25 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.DM { public class HDBaseTRxController : DmHdBaseTControllerBase, IRoutingInputsOutputs, - IComPorts + IComPorts { public RoutingInputPort DmIn { get; private set; } public RoutingOutputPort HDBaseTSink { get; private set; } - public RoutingPortCollection InputPorts - { - get { return new RoutingPortCollection { DmIn }; } - } + public RoutingPortCollection InputPorts { get; private set; } - public RoutingPortCollection OutputPorts - { - get { return new RoutingPortCollection { HDBaseTSink }; } - } + public RoutingPortCollection OutputPorts { get; private set; } public HDBaseTRxController(string key, string name, HDRx3CB rmc) : base(key, name, rmc) { - Rmc = rmc; - DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, + DmIn = new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.DmCat, 0, this); - HDBaseTSink = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, - eRoutingPortConnectionType.Hdmi, null, this); + HDBaseTSink = new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.AudioVideo, + eRoutingPortConnectionType.Hdmi, null, this) {Port = Rmc}; - // Set Ports for CEC - HDBaseTSink.Port = Rmc; // Unique case, this class has no HdmiOutput port and ICec is implemented on the receiver class itself + InputPorts = new RoutingPortCollection {DmIn}; + OutputPorts = new RoutingPortCollection {HDBaseTSink}; } #region IComPorts Members