Exemple #1
0
        private static void Main(string[] args)
        {
            var light       = new Light();
            var heater      = new Heater();
            var startButton = new StartButton();
            var door        = new Door();
            var timer       = new MicrowaveTimer();

            var microwave = new MicrowaveOvenHw(door, light, heater, startButton, timer);

            RunCommandLoop(microwave);
        }
Exemple #2
0
 static void Main(string[] args)
 {
     IMicrowaveOvenHW    hardware  = new MicrowaveOvenHW();
     ITimer              timer     = new MicrowaveTimer();
     MicrowaveController microwave = new MicrowaveController(hardware, timer);
 }