Exemplo n.º 1
0
 public void GetCurrentMeters(IList <int> installations, Action <int, int, int> action)
 {
     try
     {
         MachineManagerInterface machineManager = this.GetMachineManager();
         int i     = 1;
         int count = installations.Count;
         foreach (int installationNo in installations)
         {
             try
             {
                 if (action != null)
                 {
                     try
                     {
                         action(installationNo, i++, count);
                     }
                     catch { }
                 }
                 machineManager.MeterForcePeriodicForSIandSC(installationNo);
             }
             catch (System.Exception ex)
             {
                 ExceptionManager.Publish(ex);
             }
             Thread.Sleep(10);
         }
     }
     finally
     {
         this.ReleaseMachineManager();
     }
 }