예제 #1
0
 public RssService(IRssRepository rssRepository)
 {
     if (rssRepository == null)
     {
         throw new ArgumentNullException("rssRepository");
     }
     _rssRepository = rssRepository;
 }
예제 #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;
        }
예제 #3
0
        public DownloadManager(
            ICategoryRepository categoryRepository,
            IRssRepository rssRepository,
            IFinishedDownloadsRepository finishedDownloadsRepository,
            IDependencyComposer composer)
        {
            _categoryRepository          = categoryRepository;
            _rssRepository               = rssRepository;
            _finishedDownloadsRepository = finishedDownloadsRepository;
            _composer = composer;

            _downloadQueue            = new LinkedList <IDownloadItem>();
            _cancellationTokenSources = new Dictionary <IDownloadItem, CancellationTokenSource>();
        }
        public DownloadManager(
            ICategoryRepository categoryRepository,
            IRssRepository rssRepository,
            IFinishedDownloadsRepository finishedDownloadsRepository,
            IDependencyComposer composer)
        {
            _categoryRepository = categoryRepository;
            _rssRepository = rssRepository;
            _finishedDownloadsRepository = finishedDownloadsRepository;
            _composer = composer;

            _downloadQueue = new LinkedList<IDownloadItem>();
            _cancellationTokenSources = new Dictionary<IDownloadItem, CancellationTokenSource>();
        }
예제 #5
0
        public HomeController(IRssRepository rssRepository, ISourceRepository sourceRepository)
        {
            _rssRepository    = rssRepository;
            _sourceRepository = sourceRepository;

            _sources            = _sourceRepository.GetAllAsync().Result;
            ViewBag.sourcesList = new SelectList(_sources, "Id", "Title");
            _result             = _rssRepository.GetAllAsync().Result.Join(_sourceRepository.GetAllAsync().Result, r => r.SourceId, s => s.Id, (r, s) => new FullRss
            {
                Headline    = r.Headline,
                Description = r.Description,
                Date        = r.Date,
                Source      = s.Title,
                SourceId    = s.Id
            });
        }
        public DashboardVM(
            IDependencyComposer composer,
            IRssRepository rssRepository,
            IDownloadManager downloadManager,
            IRibbonToggleButtonVM showSummaryToggleButtonVM)
        {
            _composer = composer;
            _rssRepository = rssRepository;
            _downloadManager = downloadManager;

            ShowSummaryRibbonToggleButton = showSummaryToggleButtonVM;
            ShowSummaryRibbonToggleButton.Command = ShowSummaryCommand;
            ShowSummaryRibbonToggleButton.IsChecked = true;
            ShowSummaryRibbonToggleButton.Label = "Summary";
            ShowSummaryRibbonToggleButton.LargeImageSource =
                @"..\Images\Dashboard\SpeechBubble.png";
            ShowSummaryRibbonToggleButton.ToolTipDescription = "Shows/hides the summary speech bubble.";
            ShowSummaryRibbonToggleButton.ToolTipTitle = "Show/hide summary";

            AdornerContent = new LoadingWaitVM();
        }
예제 #7
0
        public DashboardVM(
            IDependencyComposer composer,
            IRssRepository rssRepository,
            IDownloadManager downloadManager,
            IRibbonToggleButtonVM showSummaryToggleButtonVM)
        {
            _composer        = composer;
            _rssRepository   = rssRepository;
            _downloadManager = downloadManager;

            ShowSummaryRibbonToggleButton                  = showSummaryToggleButtonVM;
            ShowSummaryRibbonToggleButton.Command          = ShowSummaryCommand;
            ShowSummaryRibbonToggleButton.IsChecked        = true;
            ShowSummaryRibbonToggleButton.Label            = "Summary";
            ShowSummaryRibbonToggleButton.LargeImageSource =
                @"..\Images\Dashboard\SpeechBubble.png";
            ShowSummaryRibbonToggleButton.ToolTipDescription = "Shows/hides the summary speech bubble.";
            ShowSummaryRibbonToggleButton.ToolTipTitle       = "Show/hide summary";

            AdornerContent = new LoadingWaitVM();
        }
예제 #8
0
        public FeedChecker(ILogger<FeedChecker> logger,
            IRssRepository rssRepository,
            ISyndicationFeedService syndicationFeedService,
            IFilterMatcher filterMatcher,
            IHttpClient httpClient,
            IMessageBus messageBus)
        {
            if (logger == null) throw new ArgumentNullException("logger");
            if (rssRepository == null) throw new ArgumentNullException("rssRepository");
            if (syndicationFeedService == null) throw new ArgumentNullException("syndicationFeedService");
            if (filterMatcher == null) throw new ArgumentNullException("filterMatcher");
            if (httpClient == null) throw new ArgumentNullException("httpClient");
            if (messageBus == null) throw new ArgumentNullException("messageBus");

            _logger = logger;
            _rssRepository = rssRepository;
            _syndicationFeedService = syndicationFeedService;
            _filterMatcher = filterMatcher;
            _httpClient = httpClient;
            _messageBus = messageBus;
        }
예제 #9
0
        public FeedChecker(ILogger <FeedChecker> logger,
                           IRssRepository rssRepository,
                           ISyndicationFeedService syndicationFeedService,
                           IFilterMatcher filterMatcher,
                           IHttpClient httpClient,
                           IMessageBus messageBus)
        {
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            if (rssRepository == null)
            {
                throw new ArgumentNullException("rssRepository");
            }
            if (syndicationFeedService == null)
            {
                throw new ArgumentNullException("syndicationFeedService");
            }
            if (filterMatcher == null)
            {
                throw new ArgumentNullException("filterMatcher");
            }
            if (httpClient == null)
            {
                throw new ArgumentNullException("httpClient");
            }
            if (messageBus == null)
            {
                throw new ArgumentNullException("messageBus");
            }

            _logger                 = logger;
            _rssRepository          = rssRepository;
            _syndicationFeedService = syndicationFeedService;
            _filterMatcher          = filterMatcher;
            _httpClient             = httpClient;
            _messageBus             = messageBus;
        }
예제 #10
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;
        }
예제 #11
0
 public Reader(IRssRepository repository)
 {
     _repository = repository;
 }
예제 #12
0
 public RssSearchController(IRssRepository rssRepository)
 {
     RssRepository = rssRepository;
 }
예제 #13
0
 public HomeController()
 {
     RssRepository = new RssRepository();
 }
예제 #14
0
 public RssService(IRssRepository rssRepository)
 {
     if (rssRepository == null) throw new ArgumentNullException("rssRepository");
     _rssRepository = rssRepository;
 }
예제 #15
0
 public RssMatchRecorder(IRssRepository rssRepository, SiteParserContainer siteParser)
 {
     RssRepository = rssRepository;
     SiteParser    = siteParser;
 }
예제 #16
0
 public RssHelper(IRssRepository RssRepository)
 {
     this.RssRepository = RssRepository;
 }
예제 #17
0
 public GetRssFeedQueryHandler(IRssRepository rssRepository, ICacheManager cacheManager)
 {
     _rssRepository = rssRepository;
     _cacheManager  = cacheManager;
 }