static void Main(string[] args)
        {
            var lampada = new Lampada();
            var interruptor = new Interruptor();
            
            interruptor.LigandoEventHandler += Interruptor_LigandoEventHandler;
            interruptor.DesligandoEventHandler += Interruptor_DesligandoEventHandler;
            
            interruptor.Ligar(lampada);
            Console.WriteLine("Lampada "+ lampada.Status);

            interruptor.Desligar(lampada);
            Console.WriteLine("Lampada " + lampada.Status);

            Console.ReadKey();
        }
 public void Desligar(Lampada lampada)
 {
     lampada.Status = Status.Desligado;
     OnDesligandoEventHandler(new InterruptorEventArgs(lampada));
 }
 public InterruptorEventArgs(Lampada lampada)
 {
     Lampada = lampada;
 }