static void Main(string[] args) { var controller = new HeatingController(); using (var termo = new Termometer(PollInterval)) { var onEvent = new TemperatureEvent(termo, 3, 15, false); var offEvent = new TemperatureEvent(termo, 3, 15, true); var strategy = new HeatingStrategy(controller, onEvent, offEvent); //strategy.Start(); termo.Start(); //strategy.Stop(); Console.ReadKey(); } Console.WriteLine("Press any key.."); Console.ReadKey(); }
static void Main(string[] args) { var controller = new HeatingController(); using (var termo = new Termometer(PollInterval)) { var onEvent = new TemperatureEvent(termo, 3, 15, false); var offEvent = new TemperatureEvent(termo, 3, 15, true); var strategy = new HeatingStrategy(controller, onEvent, offEvent); //strategy.Start(); termo.Start(); //strategy.Stop(); Console.ReadKey(); } Console.WriteLine("Press any key.."); Console.ReadKey(); }