public LogDescriptionConfig(string configFileName):base(configFileName)
 {
     Id = ConfigFileName;
     SettingsReader settingsReader = new SettingsReader(ConfigFileName);
     FileMask = new Regex(settingsReader.GetConfigParam("FileMask"), RegexOptions.Compiled);
     Encoding =  Encoding.GetEncoding(settingsReader.GetConfigParam("Encoding"));
     IEnumerable<string> possibleLogDirectories = settingsReader.GetConfigParams("LogDirectory").SelectMany(FilePathHelpers.FindDirectoriesOnFixedDisks);
     List<string> directories = possibleLogDirectories.SelectMany(FilePathHelpers.GetDirectoriesByMaskedPath).Distinct().ToList();
     LogDirectories = directories;
     _ruleManager = new EvaluatorRuleManager(Path.ChangeExtension(configFileName, "EventDescriptions"));
 }
Exemplo n.º 2
0
        public LogDescriptionConfig(string configFileName) : base(configFileName)
        {
            Id = ConfigFileName;
            SettingsReader settingsReader = new SettingsReader(ConfigFileName);

            FileMask = new Regex(settingsReader.GetConfigParam("FileMask"), RegexOptions.Compiled);
            Encoding = Encoding.GetEncoding(settingsReader.GetConfigParam("Encoding"));
            IEnumerable <string> possibleLogDirectories = settingsReader.GetConfigParams("LogDirectory").SelectMany(FilePathHelpers.FindDirectoriesOnFixedDisks);
            List <string>        directories            = possibleLogDirectories.SelectMany(FilePathHelpers.GetDirectoriesByMaskedPath).Distinct().ToList();

            LogDirectories = directories;
            _ruleManager   = new EvaluatorRuleManager(Path.ChangeExtension(configFileName, "EventDescriptions"));
        }