Ejemplo n.º 1
0
 private void RegisterRule(IEnumerable <string> rules)
 {
     foreach (var rule in rules)
     {
         _profile.Rules.Add(new RuleInfo()
         {
             AssemblyFile = rule
         });
     }
     _profile.Rules = _profile.Rules.Distinct().ToList();
     _profile.Save();
     LoadRules();
 }
Ejemplo n.º 2
0
            public MainExec(string filename)
            {
                _fileName      = filename;
                _profile       = RuleProfile.LoadFromFile();
                _profile.Rules = _profile.Rules.Distinct().ToList();
                _profile.Save();

                if (!File.Exists(_fileName))
                {
                    throw new FileNotFoundException(string.Format("File {0} could not be found", _fileName));
                }
                var extractor = new ReleaseExtractor(File.ReadAllText(_fileName));

                extractor.Load();
                _release = extractor.Release;
            }