Esempio n. 1
0
        public RssPlugin(ILogger<RssPlugin> logger, ITimerFactory timerFactory, IRssRepository rssRepository, IFeedChecker feedChecker)
        {
            if (logger == null) throw new ArgumentNullException("logger");
            if (timerFactory == null) throw new ArgumentNullException("timerFactory");
            if (rssRepository == null) throw new ArgumentNullException("rssRepository");
            if (feedChecker == null) throw new ArgumentNullException("feedChecker");

            _logger = logger;
            _rssRepository = rssRepository;
            _timer = timerFactory.Create(60000, CheckFeeds);
            _feedChecker = feedChecker;
        }
Esempio n. 2
0
        public RssPlugin(ILogger <RssPlugin> logger, ITimerFactory timerFactory, IRssRepository rssRepository, IFeedChecker feedChecker)
        {
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            if (timerFactory == null)
            {
                throw new ArgumentNullException("timerFactory");
            }
            if (rssRepository == null)
            {
                throw new ArgumentNullException("rssRepository");
            }
            if (feedChecker == null)
            {
                throw new ArgumentNullException("feedChecker");
            }

            _logger        = logger;
            _rssRepository = rssRepository;
            _timer         = timerFactory.Create(60000, CheckFeeds);
            _feedChecker   = feedChecker;
        }