From cbe96dbed98f09c9b7ee8efaae37410b3b9ed949 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 25 Mar 2020 14:33:49 -0600 Subject: [PATCH] Adds XML comments to constructors for Int, String, and Bool Feedbacks --- .../Feedbacks/BoolFeedback.cs | 18 +++++++++++++++++- .../Feedbacks/IntFeedback.cs | 17 +++++++++++++++++ .../Feedbacks/StringFeedback.cs | 3 ++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedback.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedback.cs index 60a09df8..4e8016a7 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedback.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedback.cs @@ -34,18 +34,34 @@ namespace PepperDash.Essentials.Core List LinkedCrestronFeedbacks = new List(); + /// + /// Creates the feedback with the Func as described. + /// + /// + /// While the sig value will be updated with the current value stored when it is linked to a EISC Bridge, + /// it will NOT reflect an actual value from a device until has been called + /// + /// Delegate to invoke when this feedback needs to be updated public BoolFeedback(Func valueFunc) : this(null, valueFunc) { } + /// + /// Creates the feedback with the Func as described. + /// + /// + /// While the sig value will be updated with the current value stored when it is linked to a EISC Bridge, + /// it will NOT reflect an actual value from a device until has been called + /// + /// Key to find this Feedback + /// Delegate to invoke when this feedback needs to be updated public BoolFeedback(string key, Func valueFunc) : base(key) { ValueFunc = valueFunc; } - public override void FireUpdate() { bool newValue = InTestMode ? TestValue : ValueFunc.Invoke(); diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/IntFeedback.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/IntFeedback.cs index 4a278148..25390c2c 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/IntFeedback.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/IntFeedback.cs @@ -23,11 +23,28 @@ namespace PepperDash.Essentials.Core Func ValueFunc; List LinkedInputSigs = new List(); + /// + /// Creates the feedback with the Func as described. + /// + /// + /// While the linked sig value will be updated with the current value stored when it is linked to a EISC Bridge, + /// it will NOT reflect an actual value from a device until has been called + /// + /// Delegate to invoke when this feedback needs to be updated public IntFeedback(Func valueFunc) : this(null, valueFunc) { } + /// + /// Creates the feedback with the Func as described. + /// + /// + /// While the linked sig value will be updated with the current value stored when it is linked to a EISC Bridge, + /// it will NOT reflect an actual value from a device until has been called + /// + /// Key to find this Feedback + /// Delegate to invoke when this feedback needs to be updated public IntFeedback(string key, Func valueFunc) : base(key) { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/StringFeedback.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/StringFeedback.cs index b02c02f0..ceadcace 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/StringFeedback.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/StringFeedback.cs @@ -7,6 +7,7 @@ using Crestron.SimplSharpPro; namespace PepperDash.Essentials.Core { + public class StringFeedback : Feedback { public override string StringValue { get { return _StringValue; } } // ValueFunc.Invoke(); } } @@ -18,7 +19,7 @@ namespace PepperDash.Essentials.Core public string TestValue { get; private set; } /// - /// Evalutated on FireUpdate + /// Evaluated on FireUpdate /// public Func ValueFunc { get; private set; } List LinkedInputSigs = new List();