mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Adds XML comments to constructors for Int, String, and Bool Feedbacks
This commit is contained in:
@@ -34,18 +34,34 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
List<Crestron.SimplSharpPro.DeviceSupport.Feedback> LinkedCrestronFeedbacks = new List<Crestron.SimplSharpPro.DeviceSupport.Feedback>();
|
List<Crestron.SimplSharpPro.DeviceSupport.Feedback> LinkedCrestronFeedbacks = new List<Crestron.SimplSharpPro.DeviceSupport.Feedback>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the feedback with the Func as described.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 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 <seealso cref="FireUpdate"/> has been called
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="valueFunc">Delegate to invoke when this feedback needs to be updated</param>
|
||||||
public BoolFeedback(Func<bool> valueFunc)
|
public BoolFeedback(Func<bool> valueFunc)
|
||||||
: this(null, valueFunc)
|
: this(null, valueFunc)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the feedback with the Func as described.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 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 <seealso cref="FireUpdate"/> has been called
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="key">Key to find this Feedback</param>
|
||||||
|
/// <param name="valueFunc">Delegate to invoke when this feedback needs to be updated</param>
|
||||||
public BoolFeedback(string key, Func<bool> valueFunc)
|
public BoolFeedback(string key, Func<bool> valueFunc)
|
||||||
: base(key)
|
: base(key)
|
||||||
{
|
{
|
||||||
ValueFunc = valueFunc;
|
ValueFunc = valueFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override void FireUpdate()
|
public override void FireUpdate()
|
||||||
{
|
{
|
||||||
bool newValue = InTestMode ? TestValue : ValueFunc.Invoke();
|
bool newValue = InTestMode ? TestValue : ValueFunc.Invoke();
|
||||||
|
|||||||
@@ -23,11 +23,28 @@ namespace PepperDash.Essentials.Core
|
|||||||
Func<int> ValueFunc;
|
Func<int> ValueFunc;
|
||||||
List<UShortInputSig> LinkedInputSigs = new List<UShortInputSig>();
|
List<UShortInputSig> LinkedInputSigs = new List<UShortInputSig>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the feedback with the Func as described.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 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 <seealso cref="FireUpdate"/> has been called
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="valueFunc">Delegate to invoke when this feedback needs to be updated</param>
|
||||||
public IntFeedback(Func<int> valueFunc)
|
public IntFeedback(Func<int> valueFunc)
|
||||||
: this(null, valueFunc)
|
: this(null, valueFunc)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the feedback with the Func as described.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 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 <seealso cref="FireUpdate"/> has been called
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="key">Key to find this Feedback</param>
|
||||||
|
/// <param name="valueFunc">Delegate to invoke when this feedback needs to be updated</param>
|
||||||
public IntFeedback(string key, Func<int> valueFunc)
|
public IntFeedback(string key, Func<int> valueFunc)
|
||||||
: base(key)
|
: base(key)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Crestron.SimplSharpPro;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
|
|
||||||
public class StringFeedback : Feedback
|
public class StringFeedback : Feedback
|
||||||
{
|
{
|
||||||
public override string StringValue { get { return _StringValue; } } // ValueFunc.Invoke(); } }
|
public override string StringValue { get { return _StringValue; } } // ValueFunc.Invoke(); } }
|
||||||
@@ -18,7 +19,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
public string TestValue { get; private set; }
|
public string TestValue { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Evalutated on FireUpdate
|
/// Evaluated on FireUpdate
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Func<string> ValueFunc { get; private set; }
|
public Func<string> ValueFunc { get; private set; }
|
||||||
List<StringInputSig> LinkedInputSigs = new List<StringInputSig>();
|
List<StringInputSig> LinkedInputSigs = new List<StringInputSig>();
|
||||||
|
|||||||
Reference in New Issue
Block a user