/// <summary>
 /// 检查 ACI 是否为空
 /// </summary>
 /// <returns></returns>
 private bool checkACIObject()
 {
     if (agilorACI != null)
     {
         return(true);
     }
     try
     {
         ACI_SERVER_NAME = ConfigurationManager.AppSettings["AgilorServerName"];
         ACI_SERVER_IP   = ConfigurationManager.AppSettings["AgilorServerIp"];
         agilorACI       = ACI.Instance(ACI_SERVER_NAME, ACI_SERVER_IP);
         if (agilorACI != null)
         {
             return(true);
         }
     }
     catch { }
     return(false);
 }
        /// <summary>
        /// 检查 ACI 是否为空
        /// </summary>
        /// <returns></returns>
        private bool checkACIObject()
        {
            if (agilorACI != null)
            {
                return(true);
            }

            try
            {
                agilorACI = ACI.Instance(ACI_SERVER_NAME, ACI_SERVER_IP);
                if (agilorACI != null)
                {
                    return(true);
                }
            }
            catch { }

            return(false);
        }
        static AgilorController()
        {
            string[] slaveIps  = ConfigurationManager.AppSettings["AgilorServerSlaveIp"].Split(';');
            string   slaveName = ConfigurationManager.AppSettings["AgilorServerSlaveName"];

            /*
             * foreach (string slaveIp in slaveIps)
             * {
             *  if (slaveIp.Trim() == "") continue;
             *  agilorSlaveACIs.Add(ACI.Instance(slaveName + slaveIp.Trim(), slaveIp.Trim()));
             * }
             */
            foreach (string slaveIp in slaveIps)
            {
                if (slaveIp.Trim() == "")
                {
                    continue;
                }
                Thread thread = new Thread(() => agilorSlaveACIs.Add(ACI.Instance(slaveName + slaveIp.Trim(), slaveIp.Trim())));
                thread.Start();
            }
        }