Exemplo n.º 1
0
 protected virtual void Terminate()
 {
     try
     {
         //if (ControlCEC != null)
         //ControlCEC = null;
         if (ControlIR != null)
         {
             ControlIR.UnRegister();
         }
         if (ControlRelay != null)
         {
             ControlRelay.UnRegister();
         }
         if (ControlSerial != null)
         {
             ControlSerial.UnRegister();
         }
         if (ControlTCP != null)
         {
             ControlTCP.Dispose();
         }
         if (ControlUDP != null)
         {
             ControlUDP.Dispose();
         }
         if (ControlVP != null)
         {
             ControlVP.UnRegister();
         }
     }
     catch (Exception e)
     {
         ErrorLog.Exception("Exception terminating " + this.Name, e);
     }
 }