Exemplo n.º 1
0
        public bool Initialize(Config cfg)
        {
            this.cfg = cfg;
            bool good = cfg.ParseCommandShellArgs();// override defaults and stored config values with flags from the command line
            if (good)
            {
                cfg.CmdLineActionOverride(); // override default file input setting with active command action (if any) from cmd line
                name = Config.AppName;
                Opstate.Action = (NCCAction)cfg.Cur.Action;  // command line flag can set this, the override above makes sure the cmd line is the state

                loggers = new LMLoggers(cfg);
                pest.logger = Logger(LMLoggers.AppSection.DB);
            }
            return good;
        }
Exemplo n.º 2
0
        public bool Initialize(Config cfg)
        {
            this.cfg = cfg;
            bool good = cfg.ParseCommandShellArgs();// override defaults and stored config values with flags from the command line     
            if (good)
            {
                cfg.CmdLineActionOverride(); // override default file input setting with active command action (if any) from cmd line
                name = Config.AppName;
                Opstate.Action = (NCCAction)cfg.Cur.Action;  // command line flag can set this, the override above makes sure the cmd line is the state

                loggers = new LMLoggers(cfg);
                pest.logger = Logger(LMLoggers.AppSection.DB);

                if (!String.IsNullOrEmpty(cfg.Cur.Detector) && !cfg.Cur.Detector.Equals("Default")) // command line set the value
                    IntegrationHelpers.SetNewCurrentDetector(cfg.Cur.Detector);

            }
            return good;
        }