mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 21:24:54 +00:00
fix: mark FeedbackBase default constructor as obsolete
There are situations now where feedbacks in the feedback collection can be used to update things on UIs. If the feedback doesn't have a key, it can't be used for this purpose.
This commit is contained in:
@@ -42,6 +42,7 @@ namespace PepperDash.Essentials.Core
|
||||
/// it will NOT reflect an actual value from a device until <seealso cref="FireUpdate"/> has been called
|
||||
/// </remarks>
|
||||
/// <param name="valueFunc">Delegate to invoke when this feedback needs to be updated</param>
|
||||
[Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")]
|
||||
public BoolFeedback(Func<bool> valueFunc)
|
||||
: this(null, valueFunc)
|
||||
{
|
||||
|
||||
@@ -9,8 +9,14 @@ using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for all feedback types
|
||||
/// </summary>
|
||||
public abstract class Feedback : IKeyed
|
||||
{
|
||||
/// <summary>
|
||||
/// Occurs when the output value changes
|
||||
/// </summary>
|
||||
public event EventHandler<FeedbackEventArgs> OutputChange;
|
||||
|
||||
/// <summary>
|
||||
@@ -44,10 +50,13 @@ namespace PepperDash.Essentials.Core
|
||||
/// <summary>
|
||||
/// Base Constructor - empty
|
||||
/// </summary>
|
||||
protected Feedback()
|
||||
{
|
||||
}
|
||||
[Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")]
|
||||
protected Feedback() : this(null) { }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with Key parameter
|
||||
/// </summary>
|
||||
/// <param name="key">The key for the feedback</param>
|
||||
protected Feedback(string key)
|
||||
{
|
||||
if (key == null)
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
List<StringInputSig> LinkedInputSigs = new List<StringInputSig>();
|
||||
|
||||
[Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")]
|
||||
public SerialFeedback()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace PepperDash.Essentials.Core
|
||||
/// it will NOT reflect an actual value from a device until <seealso cref="FireUpdate"/> has been called
|
||||
/// </remarks>
|
||||
/// <param name="valueFunc">Delegate to invoke when this feedback needs to be updated</param>
|
||||
[Obsolete("use constructor with Key parameter. This constructor will be removed in a future version")]
|
||||
public StringFeedback(Func<string> valueFunc)
|
||||
: this(null, valueFunc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user