Пример #1
0
 public void AddConfigurations(IScrapper scrapper, ScrapperRunnerConfiguration runnerConfig)
 {
     if (_scrapperConfigs.ContainsKey(scrapper))
     {
         _scrapperConfigs[scrapper].Add(runnerConfig);
     }
     else
     {
         _scrapperConfigs.Add(scrapper,
                              new HashSet <ScrapperRunnerConfiguration> {
             runnerConfig
         });
     }
 }
Пример #2
0
            public void AddResult(IScrapper scrapper, ScrapperRunnerConfiguration configuration, bool alertValue)
            {
                var resultKvp = new KeyValuePair <ScrapperRunnerConfiguration, bool>(configuration, alertValue);
                var key       = scrapper.GetType().Name;

                if (_scrapperRunResults.ContainsKey(key))
                {
                    _scrapperRunResults[key].Add(resultKvp);
                }
                else
                {
                    _scrapperRunResults.Add(key, new List <KeyValuePair <ScrapperRunnerConfiguration, bool> > {
                        resultKvp
                    });
                }
            }