From d6d0e3cfda20ee2e2a4d771dfb230a56fb2d0c48 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Mon, 27 Apr 2020 18:22:23 -0600 Subject: [PATCH] adds new ctor to CecPortController to add post activation func --- .../Config/Comm and IR/CecPortController.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/CecPortController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/CecPortController.cs index a2493e3c..1ab38d89 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/CecPortController.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/CecPortController.cs @@ -20,6 +20,17 @@ namespace PepperDash.Essentials.Core ICec Port; + public CecPortController(string key, Func postActivationFunc, + EssentialsControlPropertiesConfig config):base(key) + { + AddPostActivationAction(() => + { + Port = postActivationFunc(config); + + Port.StreamCec.CecChange += StreamCec_CecChange; + }); + } + public CecPortController(string key, ICec port) : base(key) {