public void checkAndAlert(List <double> alertList) { EmailAlert em = (EmailAlert)alerters[0]; LEDAlert ld = (LEDAlert)alerters[1]; foreach (double item in alertList) { if (item > (double)maxThreshold) { em.Alert(); ld.Alert(); } } }
public StatsAlerter(double maxThreshold, IAlerter[] alerters) { this._maxThreshold = maxThreshold; this._emailAlert = (EmailAlert)alerters[0]; this._ledAlert = (LEDAlert)alerters[1]; }
public StatsAlerter(float maxThreshold, IAlerter[] alerters) { this.MaxThreshold = maxThreshold; this._emailAlert = (Statistics.EmailAlert)alerters[0]; this.ledAlert = (Statistics.LEDAlert)alerters[1]; }