Example #1
0
        static void Main(string[] args)
        {
            Termometro t = new Termometro();

            subscriber1 S1 = new subscriber1(t);
            subscriber2 S2 = new subscriber2(t);

            for (int i = 0; i < 50; i++)
            {
                t.SimulateTemperatureTooHigh(RandomHelper.GetRandomInt(20, 30));
            }
            Console.ReadLine();
        }
Example #2
0
 public subscriber1(Termometro t)
 {
     this._t = t;
     this._t.TemperatureTooHigh += _t_TemperatureTooHigh;
 }