Exemple #1
0
        //@Brief Obtiene la información de la existencia de una actualización disponible
        //@Return dc_InfoUpdateSoftware Información de la actualización
        public dc_InfoUpdateSoftware CheckUpdate()
        {
            dc_InfoUpdateSoftware infoUpdate = new dc_InfoUpdateSoftware();

            infoUpdate.stationControllerSwAvailable = false;
            infoUpdate.remoteManagerSwAvailable     = false;

            try
            {
                m_mutexHostControllerEndpoints.WaitOne();
                foreach (EndpointAddress ep in m_hostControllerEndpoints)
                {
                    BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.None);
                    JBCHostControllerServiceClient serviceClient = new JBCHostControllerServiceClient(binding, ep);

                    serviceClient.Open();
                    infoUpdate = serviceClient.CheckUpdate();
                    serviceClient.Close();
                }
            }
            catch (Exception ex)
            {
                LoggerModule.logger.Error(System.Reflection.MethodInfo.GetCurrentMethod().Name + ". Error: " + ex.Message);
            }
            finally
            {
                m_mutexHostControllerEndpoints.ReleaseMutex();
            }

            return(infoUpdate);
        }