public ValueContainer( ICalculator <TValue> calculator, ITriggerSettings triggerSettings, IDetectionRange <TValue> range) : this(calculator, triggerSettings, null, range) { }
public ValueContainer( ICalculator <TValue> calculator, ITriggerSettings triggerSettings, IHistorySettings historySettings, IDetectionRange <TValue> range) { Calculator = calculator; TriggerSettings = triggerSettings; HistorySettings = historySettings ?? new HistorySettings(0); Range = range; SetCalculationDate(DateTimeOffset.Now); }
internal static Anomaly Validate <TValue>(this IDetectionRange <TValue> range, TValue value) where TValue : IComparable <TValue> { if (CompareUtilities.GreaterThan(value, range.MaxDetectionHigh)) { return(Anomaly.High); } if (CompareUtilities.SmallerThan(value, range.MaxDetectionLow)) { return(Anomaly.Low); } return(Anomaly.None); }