diff --git a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs index bc4cfde5..eb3abbb4 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs @@ -42,6 +42,7 @@ namespace PepperDash.Essentials.Core /// it will NOT reflect an actual value from a device until has been called /// /// Delegate to invoke when this feedback needs to be updated + [Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")] public BoolFeedback(Func valueFunc) : this(null, valueFunc) { diff --git a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs index d4caa7e5..723d22a6 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs @@ -9,45 +9,54 @@ using PepperDash.Core; namespace PepperDash.Essentials.Core { - public abstract class Feedback : IKeyed - { - public event EventHandler OutputChange; + /// + /// Base class for all feedback types + /// + public abstract class Feedback : IKeyed + { + /// + /// Occurs when the output value changes + /// + public event EventHandler OutputChange; /// /// Gets or sets the Key /// public string Key { get; private set; } - /// - /// Gets or sets the BoolValue - /// - /// - public virtual bool BoolValue { get { return false; } } - /// - /// Gets or sets the IntValue - /// - public virtual int IntValue { get { return 0; } } - /// - /// Gets or sets the StringValue - /// - public virtual string StringValue { get { return ""; } } + /// + /// Gets or sets the BoolValue + /// + /// + public virtual bool BoolValue { get { return false; } } + /// + /// Gets or sets the IntValue + /// + public virtual int IntValue { get { return 0; } } + /// + /// Gets or sets the StringValue + /// + public virtual string StringValue { get { return ""; } } /// /// Gets or sets the SerialValue /// public virtual string SerialValue { get { return ""; } } - /// - /// Gets or sets the InTestMode - /// - public bool InTestMode { get; protected set; } + /// + /// Gets or sets the InTestMode + /// + public bool InTestMode { get; protected set; } - /// - /// Base Constructor - empty - /// - protected Feedback() - { - } + /// + /// Base Constructor - empty + /// + [Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")] + protected Feedback() : this(null) { } + /// + /// Constructor with Key parameter + /// + /// The key for the feedback protected Feedback(string key) { if (key == null) @@ -58,27 +67,27 @@ namespace PepperDash.Essentials.Core - /// - /// ClearTestValue method - /// - public void ClearTestValue() - { - InTestMode = false; - FireUpdate(); - } + /// + /// ClearTestValue method + /// + public void ClearTestValue() + { + InTestMode = false; + FireUpdate(); + } - /// - /// Fires an update synchronously - /// - public abstract void FireUpdate(); + /// + /// Fires an update synchronously + /// + public abstract void FireUpdate(); - /// - /// Fires the update asynchronously within a CrestronInvoke - /// - public void InvokeFireUpdate() - { - CrestronInvoke.BeginInvoke(o => FireUpdate()); - } + /// + /// Fires the update asynchronously within a CrestronInvoke + /// + public void InvokeFireUpdate() + { + CrestronInvoke.BeginInvoke(o => FireUpdate()); + } /// /// Helper method that fires event. Use this intstead of calling OutputChange @@ -103,5 +112,5 @@ namespace PepperDash.Essentials.Core { if (OutputChange != null) OutputChange(this, new FeedbackEventArgs(value)); } - } + } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs index 0daec8c1..b26e23e6 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs @@ -13,7 +13,7 @@ namespace PepperDash.Essentials.Core /// public class SerialFeedback : Feedback { - public override string SerialValue { get { return _SerialValue; } } + public override string SerialValue { get { return _SerialValue; } } string _SerialValue; //public override eCueType Type { get { return eCueType.Serial; } } @@ -25,6 +25,7 @@ namespace PepperDash.Essentials.Core List LinkedInputSigs = new List(); + [Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")] public SerialFeedback() { } diff --git a/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs index fe6d6884..f7d594c4 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs @@ -38,6 +38,7 @@ namespace PepperDash.Essentials.Core /// it will NOT reflect an actual value from a device until has been called /// /// Delegate to invoke when this feedback needs to be updated + [Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")] public StringFeedback(Func valueFunc) : this(null, valueFunc) {