Exemplo n.º 1
0
        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();
                }
            }
        }
Exemplo n.º 2
0
 public StatsAlerter(double maxThreshold, IAlerter[] alerters)
 {
     this._maxThreshold = maxThreshold;
     this._emailAlert   = (EmailAlert)alerters[0];
     this._ledAlert     = (LEDAlert)alerters[1];
 }
Exemplo n.º 3
0
 public StatsAlerter(float maxThreshold, IAlerter[] alerters)
 {
     this.MaxThreshold = maxThreshold;
     this._emailAlert  = (Statistics.EmailAlert)alerters[0];
     this.ledAlert     = (Statistics.LEDAlert)alerters[1];
 }