Пример #1
0
 public DatabaseLint()
 {
     //Load all executables
     this.AllExecutables = RuleLoader.LoadRules();
     //Save standard config if none exist
     if (DBLint.Settings.IsNormalContext)
     {
         /*
          * if (!File.Exists(Settings.CONFIG_FILE))
          *  PropertyUtils.SaveProperties(this.AllExecutables.GetExecutables(), Settings.CONFIG_FILE);
          * PropertyUtils.LoadProperties(this.AllExecutables.GetExecutables(), Settings.CONFIG_FILE);
          */
     }
     this.RuleController = new RuleController();
     this.IssueCollector = new IssueCollector();
     this.Config         = new Configuration();
     this.ConfigFile     = new XMLConfigFile(Settings.XMLCONFIG);
 }
Пример #2
0
        //Constructor, create run from config file
        public Run(IConfigFile config)
        {
            this.ConfigFile = config;

            //Load all executables
            this.Executables = RuleLoader.LoadRules();

            if (this.ConfigFile.IsValid())
            {
                //Configure executables
                this.configureRulesFromConfig();

                //Extract connection from config
                this.Connection = config.GetConnection();

                //Set RulesToRun from the config file and configure
                this.setRulesToRunFromConfig();
            }
        }
Пример #3
0
 public Run()
 {
     this.Executables = RuleLoader.LoadRules();
     this.RulesToRun  = this.Executables.GetSchemaRules().Cast <IRule>().ToList();
     this.Connection  = new Connection();
 }