Esempio n. 1
0
        public OracleController SetupObject()
        {
            var oc = new OracleController();

            oc.Request = GlobalHelper.GetRequestObject(oc);
            var uri = new System.Uri("http://www.contoso.com/?l=true&c=12&d=x");

            oc.Request.RequestUri = uri;
            return(oc);
        }
Esempio n. 2
0
File: Vtwin.cs Progetto: deeze307/IA
        private void StartInspection()
        {
            bool OracleSuccess = false;

            OracleController oc = new OracleController(this);

            OracleSuccess = oc.GetMachines();

            if (OracleSuccess)
            {
                aoiLog.debug("Comenzando analisis de inspecciones");

                // Lista de maquinas VTWIN
                IEnumerable <Machine> oracleMachines = Machine.list.Where(obj => obj.tipo == aoiConfig.machineNameKey);
                List <Machine>        endInspect     = new List <Machine>();

                // Generacion de tabs segun las maquinas descargadas
                foreach (Machine inspMachine in oracleMachines.OrderBy(o => o.nroLinea))
                {
                    DynamicTab(inspMachine);
                }

                try
                {
                    HandlePendientInspection();
                }
                catch (Exception ex)
                {
                    aoiLog.stack(ex.Message, this, ex);
                }

                #region HandleInspection
                foreach (Machine inspMachine in oracleMachines)
                {
                    // Algunas maquinas las inspecciono al final, porque son lentas para procesar
                    if (Config.isEndInspect(inspMachine))
                    {
                        endInspect.Add(inspMachine);
                    }
                    else
                    {
                        TryInspectionProccess(inspMachine);
                    }
                } // end foreach
                #endregion

                #region MAQUINAS DE PROCESO LENTO AL FINAL
                foreach (Machine inspMachine in endInspect)
                {
                    TryInspectionProccess(inspMachine);
                }
                #endregion
            }
        }
Esempio n. 3
0
        private void StartInspection()
        {
            aoiLog.debug("StartInspection()");

            bool OracleSuccess = false;

            OracleController oc = new OracleController(this);

            OracleSuccess = oc.GetMachines();

            if (OracleSuccess)
            {
                aoiLog.info("Comenzando analisis de inspecciones");

                // Lista de maquinas VTWIN
                IEnumerable <Machine> oracleMachines = Machine.list.Where(obj => obj.tipo == aoiConfig.machineNameKey);

                // Generacion de tabs segun las maquinas descargadas
                foreach (Machine inspMachine in oracleMachines.OrderBy(o => o.nroLinea))
                {
                    DynamicTab(inspMachine);
                }

                try
                {
                    HandlePendientInspection();
                }
                catch (Exception ex)
                {
                    aoiLog.stack(ex.Message, this, ex);
                }

                #region HandleInspection
                foreach (Machine inspMachine in oracleMachines)
                {
                    // Filtro maquinas en ByPass
                    if (Config.isByPassMode(inspMachine))
                    {
                        // SKIP MACHINE
                        aoiLog.warning(
                            string.Format("{0} {1} | En ByPass / Se detiene el proceso de inspeccion", inspMachine.maquina, inspMachine.smd)
                            );
                    }
                    else
                    {
                        TryInspectionProccess(inspMachine);
                    }
                }
                #endregion
            }
        }
Esempio n. 4
0
 private void nlscan_pkg(TransDTO transDTO, RedirectModel redirectModel)
 {
     outStr = OracleController.NlscanPkg(redirectModel.connStr, redirectModel.pkgName, redirectModel.pFlag
                                         , transDTO.codestr, transDTO.ip, transDTO.appName, transDTO.stockNo, redirectModel.isCache);
     LoggerHelper.Info(transDTO.ip + "  --nlscan_pkg:" + outStr);
 }
Esempio n. 5
0
 public static HttpRequestMessage GetRequestObject(OracleController controller)
 {
     controller.Request = new HttpRequestMessage();
     controller.Request.Properties.Add(HttpPropertyKeys.HttpConfigurationKey, new HttpConfiguration());
     return(controller.Request);
 }