コード例 #1
0
        internal async Task <(Anomaly anomaly, Trigger trigger)> AddValue(TValue value)
        {
            var anomaly = Range.Validate(value);

            if (anomaly == Anomaly.None)
            {
                var referenceDate = await AddValueOnReferenceDate(value).ConfigureAwait(false);

                return(anomaly, TriggerSettings.DetermineTrigger(referenceDate, NextCalculationDate, Values.Count));
            }

            Anomalies.Add(value);
            return(anomaly, TriggerSettings.DetermineAnomalyTrigger(Anomalies.Count));
        }
コード例 #2
0
 internal void AddAnomaly(TValue value)
 {
     Anomalies.Add(value);
 }