예제 #1
0
        public EpisodePageViewModel(INavigationService navigationService, ICrawlerService crawlerService, ITraktService traktService)
        {
            this.navigationService = navigationService;
            this.crawlerService = crawlerService;
            this.traktService = traktService;

            this.excludedLinks = new List<string>();
        }
예제 #2
0
 public HomeController(ICrawlerService crawlerService,
                       ISitemapService sitemapService, IRequestService requestService,
                       ISiteSerivice siteService, IMapper mapper, IHistoryService historyService)
 {
     _crawlerService = crawlerService;
     _sitemapService = sitemapService;
     _siteSerivice   = siteService;
     _requestService = requestService;
     _mapper         = mapper;
     _historyService = historyService;
 }
예제 #3
0
 public DetailsTumblrTagSearchViewModel([Import("TumblrTagSearchView", typeof(IDetailsView))] IDetailsView view, IClipboardService clipboardService, IDetailsService detailsService,
                                        ICrawlerService crawlerService)
     : base(view)
 {
     _clipboardService = clipboardService;
     _detailsService   = detailsService;
     _copyUrlCommand   = new DelegateCommand(CopyUrlToClipboard);
     _browseFileDownloadLocationCommand = new DelegateCommand(BrowseFileDownloadLocation);
     Collections = CollectionViewSource.GetDefaultView(crawlerService.Collections);
     crawlerService.Collections.CollectionChanged += CrawlerService_Collections_CollectionChanged;
 }
예제 #4
0
 protected AbstractCrawler(IShellService shellService, CancellationToken ct, PauseToken pt, IProgress <DownloadProgress> progress, ICrawlerService crawlerService, IDownloader downloader, BlockingCollection <TumblrPost> producerConsumerCollection, IBlog blog)
 {
     this.shellService               = shellService;
     this.crawlerService             = crawlerService;
     this.downloader                 = downloader;
     this.producerConsumerCollection = producerConsumerCollection;
     this.blog     = blog;
     this.ct       = ct;
     this.pt       = pt;
     this.progress = progress;
 }
예제 #5
0
 public TumblrLikedByCrawler(IShellService shellService, ICrawlerService crawlerService, IWebRequestFactory webRequestFactory,
                             ISharedCookieService cookieService, IDownloader downloader, ITumblrParser tumblrParser, IImgurParser imgurParser,
                             IGfycatParser gfycatParser, IWebmshareParser webmshareParser, IMixtapeParser mixtapeParser, IUguuParser uguuParser,
                             ISafeMoeParser safemoeParser, ILoliSafeParser lolisafeParser, ICatBoxParser catboxParser,
                             IPostQueue <TumblrPost> postQueue, IBlog blog, IProgress <DownloadProgress> progress, PauseToken pt, CancellationToken ct)
     : base(shellService, crawlerService, webRequestFactory, cookieService, tumblrParser, imgurParser, gfycatParser,
            webmshareParser, mixtapeParser, uguuParser, safemoeParser, lolisafeParser, catboxParser, postQueue, blog,
            progress, pt, ct)
 {
     this.downloader = downloader;
 }
예제 #6
0
 public void BeforeEach()
 {
     this.browserUtilityMock =
         new Mock<IBrowserUtility>();
     this.resultService =
         new ResultServiceMock();
     this.crawlerService =
         new CrawlerService(
             this.resultService,
             this.browserUtilityMock.Object);
 }
예제 #7
0
 public TwitterCrawler(IShellService shellService, ICrawlerService crawlerService, IProgress <DownloadProgress> progress, IWebRequestFactory webRequestFactory,
                       ISharedCookieService cookieService, IPostQueue <AbstractPost> postQueue, IPostQueue <CrawlerData <Tweet> > jsonQueue, IBlog blog, IDownloader downloader,
                       ICrawlerDataDownloader crawlerDataDownloader, PauseToken pt, CancellationToken ct)
     : base(shellService, crawlerService, progress, webRequestFactory, cookieService, postQueue, blog, downloader, pt, ct)
 {
     this.downloader = downloader;
     this.downloader.ChangeCancellationToken(Ct);
     this.jsonQueue             = jsonQueue;
     this.crawlerDataDownloader = crawlerDataDownloader;
     this.crawlerDataDownloader.ChangeCancellationToken(Ct);
 }
예제 #8
0
 public ManagerService(IShellService shellService, ICrawlerService crawlerService, IMessageService messageService)
 {
     BlogFiles = new ObservableCollection <IBlog>();
     Application.Current.Dispatcher.Invoke(new Action(() => BindingOperations.EnableCollectionSynchronization(BlogFiles, blogFilesLock)));
     blogFilesView        = CollectionViewSource.GetDefaultView(BlogFiles);
     blogFilesView.Filter = BlogFilesViewSource_Filter;
     databases            = new List <IFiles>();
     archivedLinks        = new HashSet <string>();
     this.shellService    = shellService;
     this.messageService  = messageService;
     crawlerService.ActiveCollectionIdChanged += CrawlerService_ActiveCollectionIdChanged;
 }
예제 #9
0
 protected AbstractDownloader(IShellService shellService, CancellationToken ct, PauseToken pt, IProgress <DownloadProgress> progress, BlockingCollection <TumblrPost> producerConsumerCollection, FileDownloader fileDownloader, ICrawlerService crawlerService = null, IBlog blog = null, IFiles files = null)
 {
     this.shellService               = shellService;
     this.crawlerService             = crawlerService;
     this.blog                       = blog;
     this.files                      = files;
     this.ct                         = ct;
     this.pt                         = pt;
     this.progress                   = progress;
     this.producerConsumerCollection = producerConsumerCollection;
     this.fileDownloader             = fileDownloader;
 }
예제 #10
0
 protected AbstractDownloader(IShellService shellService, IManagerService managerService, CancellationToken ct, PauseToken pt, IProgress <DownloadProgress> progress, IPostQueue <TumblrPost> postQueue, FileDownloader fileDownloader, ICrawlerService crawlerService = null, IBlog blog = null, IFiles files = null)
 {
     this.shellService   = shellService;
     this.crawlerService = crawlerService;
     this.managerService = managerService;
     this.blog           = blog;
     this.files          = files;
     this.ct             = ct;
     this.pt             = pt;
     this.progress       = progress;
     this.postQueue      = postQueue;
     this.fileDownloader = fileDownloader;
 }
예제 #11
0
 public TumblrHiddenCrawler(IShellService shellService, ICrawlerService crawlerService, IWebRequestFactory webRequestFactory,
                            ISharedCookieService cookieService, IDownloader downloader, ICrawlerDataDownloader crawlerDataDownloader,
                            ITumblrToTextParser <Post> tumblrJsonParser, ITumblrParser tumblrParser, IImgurParser imgurParser,
                            IGfycatParser gfycatParser, IWebmshareParser webmshareParser, IUguuParser uguuParser, ICatBoxParser catboxParser,
                            IPostQueue <AbstractPost> postQueue, IPostQueue <CrawlerData <Post> > jsonQueue, IBlog blog, IProgress <DownloadProgress> progress, PauseToken pt, CancellationToken ct)
     : base(shellService, crawlerService, webRequestFactory, cookieService, tumblrParser, imgurParser, gfycatParser,
            webmshareParser, uguuParser, catboxParser, postQueue, blog, downloader, crawlerDataDownloader, progress, pt,
            ct)
 {
     this.downloader       = downloader;
     this.tumblrJsonParser = tumblrJsonParser;
     this.jsonQueue        = jsonQueue;
 }
예제 #12
0
 protected AbstractCrawler(IShellService shellService, ICrawlerService crawlerService, CancellationToken ct,
                           IProgress <DownloadProgress> progress, IWebRequestFactory webRequestFactory, ISharedCookieService cookieService,
                           IPostQueue <TumblrPost> postQueue, IBlog blog)
 {
     this.shellService      = shellService;
     this.crawlerService    = crawlerService;
     this.webRequestFactory = webRequestFactory;
     this.cookieService     = cookieService;
     this.postQueue         = postQueue;
     this.blog     = blog;
     this.ct       = ct;
     this.progress = progress;
 }
예제 #13
0
        public ManagerViewModel(IManagerView view, IShellService shellService, Lazy <ISelectionService> selectionService, ICrawlerService crawlerService) : base(view)
        {
            ShellService              = shellService;
            this.selectionService     = selectionService;
            this.selectedManagerItems = new ObservableCollection <Blog>();
            this.crawlerService       = crawlerService;

            if (shellService.Settings.ColumnWidths.Count != 0)
            {
                view.DataGridColumnRestore = ShellService.Settings.ColumnWidths;
            }

            ShellService.Closing += ViewClosed;
        }
예제 #14
0
 protected AbstractCrawler(IShellService shellService, ICrawlerService crawlerService, IProgress <DownloadProgress> progress, IWebRequestFactory webRequestFactory,
                           ISharedCookieService cookieService, IPostQueue <TumblrPost> postQueue, IBlog blog,
                           PauseToken pt, CancellationToken ct)
 {
     ShellService      = shellService;
     CrawlerService    = crawlerService;
     WebRequestFactory = webRequestFactory;
     CookieService     = cookieService;
     PostQueue         = postQueue;
     Blog     = blog;
     Progress = progress;
     Pt       = pt;
     Ct       = ct;
 }
예제 #15
0
 protected AbstractDownloader(IShellService shellService, IManagerService managerService, CancellationToken ct, PauseToken pt, IProgress <DownloadProgress> progress, IPostQueue <TumblrPost> postQueue, FileDownloader fileDownloader, ICrawlerService crawlerService = null, IBlog blog = null, IFiles files = null)
 {
     this.shellService   = shellService;
     this.crawlerService = crawlerService;
     this.managerService = managerService;
     this.blog           = blog;
     this.files          = files;
     this.ct             = ct;
     this.pt             = pt;
     this.progress       = progress;
     this.postQueue      = postQueue;
     this.fileDownloader = fileDownloader;
     _saveTimer          = new Timer(_ => OnSaveTimedEvent(), null, SAVE_TIMESPAN_SECS * 1000, SAVE_TIMESPAN_SECS * 1000);
 }
        public MainWindowViewModel(ISettings settings, ICrawlerService crawlerService, IPleaseWaitService pleaseWaitService)
            : base()
        {
            Argument.IsNotNull(() => settings);
            Argument.IsNotNull(() => crawlerService);
            Argument.IsNotNull(() => pleaseWaitService);

            _crawlerService = crawlerService;
            _pleaseWaitService = pleaseWaitService;

            Settings = settings;

            AvailableEntries = new ObservableCollection<IEntry>();
        }
예제 #17
0
 public CrawlerController(IShellService shellService, IManagerService managerService, ICrawlerService crawlerService,
                          ICrawlerFactory crawlerFactory, Lazy <CrawlerViewModel> crawlerViewModel)
 {
     _shellService     = shellService;
     _managerService   = managerService;
     _crawlerService   = crawlerService;
     _crawlerViewModel = crawlerViewModel;
     _crawlerFactory   = crawlerFactory;
     _crawlCommand     = new AsyncDelegateCommand(SetupCrawlAsync, CanCrawl);
     _pauseCommand     = new DelegateCommand(Pause, CanPause);
     _resumeCommand    = new DelegateCommand(Resume, CanResume);
     _stopCommand      = new DelegateCommand(Stop, CanStop);
     _runningTasks     = new List <Task>();
     _lockObject       = new object();
 }
예제 #18
0
 public CrawlerController(IShellService shellService, IManagerService managerService, ICrawlerService crawlerService,
                          ICrawlerFactory crawlerFactory, Lazy <CrawlerViewModel> crawlerViewModel)
 {
     this.shellService     = shellService;
     this.managerService   = managerService;
     this.crawlerService   = crawlerService;
     this.crawlerViewModel = crawlerViewModel;
     CrawlerFactory        = crawlerFactory;
     crawlCommand          = new AsyncDelegateCommand(Crawl, CanCrawl);
     pauseCommand          = new DelegateCommand(Pause, CanPause);
     resumeCommand         = new DelegateCommand(Resume, CanResume);
     stopCommand           = new DelegateCommand(Stop, CanStop);
     runningTasks          = new List <Task>();
     lockObject            = new object();
 }
예제 #19
0
 public DetectionService(
     IUserAgentService userAgentService,
     IDeviceService device,
     ICrawlerService crawler,
     IBrowserService browser,
     IEngineService engine,
     IPlatformService platform)
 {
     UserAgent = userAgentService.UserAgent;
     Device    = device;
     Crawler   = crawler;
     Browser   = browser;
     Engine    = engine;
     Platform  = platform;
 }
예제 #20
0
 protected Downloader(IShellService shellService, ICrawlerService crawlerService = null, IBlog blog = null)
 {
     this.shellService   = shellService;
     this.crawlerService = crawlerService;
     this.blog           = blog;
     counter             = new PostCounter(blog);
     files                      = LoadFiles();
     lockObjectDb               = new object();
     lockObjectDirectory        = new object();
     lockObjectDownload         = new object();
     lockObjectProgress         = new object();
     statisticsBag              = new ConcurrentBag <Tuple <PostTypes, string, string> >();
     producerConsumerCollection = new BlockingCollection <Tuple <PostTypes, string, string> >();
     SetUp();
 }
 protected AbstractTumblrCrawler(IShellService shellService, ICrawlerService crawlerService, IWebRequestFactory webRequestFactory, ISharedCookieService cookieService,
                                 ITumblrParser tumblrParser, IImgurParser imgurParser, IGfycatParser gfycatParser, IWebmshareParser webmshareParser, IUguuParser uguuParser,
                                 ICatBoxParser catboxParser, IPostQueue <AbstractPost> postQueue, IBlog blog, IDownloader downloader, ICrawlerDataDownloader crawlerDataDownloader,
                                 IProgress <DownloadProgress> progress, PauseToken pt, CancellationToken ct)
     : base(shellService, crawlerService, progress, webRequestFactory, cookieService, postQueue, blog, downloader, pt, ct)
 {
     this.crawlerDataDownloader = crawlerDataDownloader;
     this.crawlerDataDownloader?.ChangeCancellationToken(Ct);
     this.TumblrParser    = tumblrParser;
     this.ImgurParser     = imgurParser;
     this.GfycatParser    = gfycatParser;
     this.WebmshareParser = webmshareParser;
     this.UguuParser      = uguuParser;
     this.CatboxParser    = catboxParser;
 }
예제 #22
0
 protected AbstractTumblrCrawler(IShellService shellService, ICrawlerService crawlerService, IWebRequestFactory webRequestFactory, ISharedCookieService cookieService,
                                 ITumblrParser tumblrParser, IImgurParser imgurParser, IGfycatParser gfycatParser, IWebmshareParser webmshareParser,
                                 IMixtapeParser mixtapeParser, IUguuParser uguuParser, ISafeMoeParser safemoeParser, ILoliSafeParser lolisafeParser,
                                 ICatBoxParser catboxParser, IPostQueue <TumblrPost> postQueue, IBlog blog, IProgress <DownloadProgress> progress, PauseToken pt, CancellationToken ct)
     : base(shellService, crawlerService, progress, webRequestFactory, cookieService, postQueue, blog, pt, ct)
 {
     this.TumblrParser    = tumblrParser;
     this.ImgurParser     = imgurParser;
     this.GfycatParser    = gfycatParser;
     this.WebmshareParser = webmshareParser;
     this.MixtapeParser   = mixtapeParser;
     this.UguuParser      = uguuParser;
     this.SafemoeParser   = safemoeParser;
     this.LolisafeParser  = lolisafeParser;
     this.CatboxParser    = catboxParser;
 }
예제 #23
0
 public TumblrBlogCrawler(IShellService shellService, CancellationToken ct, PauseToken pt,
                          IProgress <DownloadProgress> progress, ICrawlerService crawlerService, IWebRequestFactory webRequestFactory,
                          ISharedCookieService cookieService, IDownloader downloader, ICrawlerDataDownloader crawlerDataDownloader,
                          ITumblrToTextParser <Post> tumblrJsonParser, ITumblrParser tumblrParser, IImgurParser imgurParser,
                          IGfycatParser gfycatParser, IWebmshareParser webmshareParser, IMixtapeParser mixtapeParser, IUguuParser uguuParser,
                          ISafeMoeParser safemoeParser, ILoliSafeParser lolisafeParser, ICatBoxParser catboxParser,
                          IPostQueue <TumblrPost> postQueue, IPostQueue <TumblrCrawlerData <Post> > jsonQueue, IBlog blog)
     : base(shellService, crawlerService, ct, pt, progress, webRequestFactory, cookieService, tumblrParser, imgurParser,
            gfycatParser, webmshareParser, mixtapeParser, uguuParser, safemoeParser, lolisafeParser, catboxParser, postQueue,
            blog)
 {
     this.downloader            = downloader;
     this.tumblrJsonParser      = tumblrJsonParser;
     this.jsonQueue             = jsonQueue;
     this.crawlerDataDownloader = crawlerDataDownloader;
 }
예제 #24
0
 public AppController(IAktuelPageService aktuelPageService,
                      IAktuelService aktuelService,
                      ICompanyService companyService,
                      IQueueService queueService,
                      ICrawlerService crawlerService,
                      IUploadService uploadService,
                      ICognitiveService cognitiveService)
 {
     this.aktuelPageService = aktuelPageService;
     this.aktuelService     = aktuelService;
     this.companyService    = companyService;
     this.queueService      = queueService;
     this.crawlerService    = crawlerService;
     this.uploadService     = uploadService;
     this.cognitiveService  = cognitiveService;
 }
예제 #25
0
        protected AbstractDownloader(IShellService shellService, IManagerService managerService, CancellationToken ct, PauseToken pt, IProgress <DownloadProgress> progress, IPostQueue <AbstractPost> postQueue, FileDownloader fileDownloader, ICrawlerService crawlerService = null, IBlog blog = null, IFiles files = null)
        {
            this.shellService   = shellService;
            this.crawlerService = crawlerService;
            this.managerService = managerService;
            this.blog           = blog;
            this.files          = files;
            this.ct             = ct;
            this.pt             = pt;
            this.progress       = progress;
            this.postQueue      = postQueue;
            this.fileDownloader = fileDownloader;
            Progress <Exception> prog = new Progress <Exception>((e) => shellService.ShowError(e, Resources.CouldNotSaveBlog, blog.Name));

            _saveTimer = new Timer(_ => OnSaveTimedEvent(prog), null, SAVE_TIMESPAN_SECS * 1000, SAVE_TIMESPAN_SECS * 1000);
        }
예제 #26
0
 public QueueController(IFileDialogService fileDialogService, IShellService shellService, IDetailsService detailsService,
                        IManagerService managerService, ICrawlerService crawlerService, Lazy <QueueViewModel> queueViewModel)
 {
     _fileDialogService      = fileDialogService;
     _shellService           = shellService;
     _queueViewModel         = queueViewModel;
     _managerService         = managerService;
     _crawlerService         = crawlerService;
     _detailsService         = detailsService;
     _removeSelectedCommand  = new DelegateCommand(RemoveSelected, CanRemoveSelected);
     _showBlogDetailsCommand = new DelegateCommand(ShowBlogDetails);
     _openQueueCommand       = new DelegateCommand(OpenList);
     _saveQueueCommand       = new DelegateCommand(SaveList);
     _clearQueueCommand      = new DelegateCommand(ClearList);
     _openQueuelistFileType  = new FileType(Resources.Queuelist, SupportedFileTypes.QueueFileExtensions);
     _saveQueuelistFileType  = new FileType(Resources.Queuelist, SupportedFileTypes.QueueFileExtensions[0]);
 }
        public EntryViewModel(IEntry entry, IPleaseWaitService pleaseWaitService, ICrawlerService crawlerService, IProcessService processService, 
            ISettings settings)
        {
            Argument.IsNotNull(() => entry);
            Argument.IsNotNull(() => pleaseWaitService);
            Argument.IsNotNull(() => crawlerService);
            Argument.IsNotNull(() => processService);
            Argument.IsNotNull(() => settings);

            Entry = entry;
            _pleaseWaitService = pleaseWaitService;
            _crawlerService = crawlerService;
            _processService = processService;
            _settings = settings;

            OpenInBrowser = new Command(OnOpenInBrowserExecute, OnOpenInBrowserCanExecute);
        }
예제 #28
0
 public QueueController(IFileDialogService fileDialogService, IShellService shellService, IDetailsService detailsService,
                        IManagerService managerService, ICrawlerService crawlerService, Lazy <QueueViewModel> queueViewModel)
 {
     this.fileDialogService = fileDialogService;
     this.shellService      = shellService;
     this.queueViewModel    = queueViewModel;
     this.managerService    = managerService;
     this.crawlerService    = crawlerService;
     this.detailsService    = detailsService;
     removeSelectedCommand  = new DelegateCommand(RemoveSelected, CanRemoveSelected);
     showBlogDetailsCommand = new DelegateCommand(ShowBlogDetails);
     openQueueCommand       = new DelegateCommand(OpenList);
     saveQueueCommand       = new DelegateCommand(SaveList);
     clearQueueCommand      = new DelegateCommand(ClearList);
     openQueuelistFileType  = new FileType(Resources.Queuelist, SupportedFileTypes.QueueFileExtensions);
     saveQueuelistFileType  = new FileType(Resources.Queuelist, SupportedFileTypes.QueueFileExtensions.First());
 }
예제 #29
0
 public TumblrHiddenCrawler(IShellService shellService, CancellationToken ct, PauseToken pt, IProgress <DownloadProgress> progress,
                            ICrawlerService crawlerService, IWebRequestFactory webRequestFactory, ISharedCookieService cookieService, IDownloader downloader,
                            ICrawlerDataDownloader crawlerDataDownloader, ITumblrToTextParser <Post> tumblrJsonParser, IImgurParser imgurParser,
                            IGfycatParser gfycatParser, IWebmshareParser webmshareParser, IPostQueue <TumblrPost> postQueue,
                            IPostQueue <TumblrCrawlerData <Post> > jsonQueue, IBlog blog)
     : base(shellService, ct, progress, webRequestFactory, cookieService, postQueue, blog)
 {
     this.crawlerService        = crawlerService;
     this.downloader            = downloader;
     this.pt                    = pt;
     this.tumblrJsonParser      = tumblrJsonParser;
     this.imgurParser           = imgurParser;
     this.gfycatParser          = gfycatParser;
     this.webmshareParser       = webmshareParser;
     this.jsonQueue             = jsonQueue;
     this.crawlerDataDownloader = crawlerDataDownloader;
 }
예제 #30
0
 protected AbstractCrawler(IShellService shellService, ICrawlerService crawlerService, IProgress <DownloadProgress> progress, IWebRequestFactory webRequestFactory,
                           ISharedCookieService cookieService, IPostQueue <AbstractPost> postQueue, IBlog blog, IDownloader downloader,
                           PauseToken pt, CancellationToken ct)
 {
     ShellService      = shellService;
     CrawlerService    = crawlerService;
     WebRequestFactory = webRequestFactory;
     CookieService     = cookieService;
     PostQueue         = postQueue;
     Blog       = blog;
     Downloader = downloader;
     Progress   = progress;
     Pt         = pt;
     // TODO: Find a better way for this construct
     InterruptionTokenSource = new CancellationTokenSource();
     LinkedTokenSource       = CancellationTokenSource.CreateLinkedTokenSource(ct, InterruptionTokenSource.Token);
     Ct = LinkedTokenSource.Token;
 }
예제 #31
0
 public ManagerController(IShellService shellService, ISelectionService selectionService, ICrawlerService crawlerService,
                          IManagerService managerService, IDownloaderFactory downloaderFactory, Lazy <ManagerViewModel> managerViewModel)
 {
     this.shellService      = shellService;
     this.selectionService  = selectionService;
     this.crawlerService    = crawlerService;
     this.managerService    = managerService;
     this.managerViewModel  = managerViewModel;
     DownloaderFactory      = downloaderFactory;
     blogFiles              = new ObservableCollection <Blog>();
     addBlogCommand         = new AsyncDelegateCommand(AddBlog, CanAddBlog);
     removeBlogCommand      = new DelegateCommand(RemoveBlog, CanRemoveBlog);
     showFilesCommand       = new DelegateCommand(ShowFiles, CanShowFiles);
     visitBlogCommand       = new DelegateCommand(VisitBlog, CanVisitBlog);
     enqueueSelectedCommand = new DelegateCommand(EnqueueSelected, CanEnqueueSelected);
     listenClipboardCommand = new DelegateCommand(ListenClipboard);
     autoDownloadCommand    = new DelegateCommand(EnqueueAutoDownload, CanEnqueueAutoDownload);
     showDetailsCommand     = new DelegateCommand(ShowDetailsCommand);
 }
예제 #32
0
 public PostService(IGoblinUnitOfWork goblinUnitOfWork,
                    IGoblinRepository <PostEntity> postRepo,
                    ICrawlerService <BlogCwaMeUkCrawlerService> blogCwaMeUkCrawlerService,
                    ICrawlerService <DotNetWeeklyCrawlerService> dotNetWeeklyCrawlerService,
                    ICrawlerService <HanselManCrawlerService> hanselManCrawlerService,
                    ICrawlerService <HaackedCrawlerService> haackedCrawlerService,
                    ICrawlerService <TalkingDotNetCrawlerService> talkingDotNetCrawlerService,
                    ICrawlerService <CodeOpinionCrawlerService> codeOpinionCrawlerService
                    ) : base(
         goblinUnitOfWork)
 {
     _postRepo = postRepo;
     _blogCwaMeUkCrawlerService   = blogCwaMeUkCrawlerService;
     _dotNetWeeklyCrawlerService  = dotNetWeeklyCrawlerService;
     _hanselManCrawlerService     = hanselManCrawlerService;
     _haackedCrawlerService       = haackedCrawlerService;
     _talkingDotNetCrawlerService = talkingDotNetCrawlerService;
     _codeOpinionCrawlerService   = codeOpinionCrawlerService;
 }
예제 #33
0
        public SettingsViewModel(ISettingsView view, IShellService shellService, ICrawlerService crawlerService,
                                 ExportFactory <AuthenticateViewModel> authenticateViewModelFactory)
            : base(view)
        {
            ShellService   = shellService;
            settings       = ShellService.Settings;
            CrawlerService = crawlerService;
            this.authenticateViewModelFactory = authenticateViewModelFactory;
            folderBrowser = new FolderBrowserDataModel();
            displayFolderBrowserCommand = new DelegateCommand(DisplayFolderBrowser);
            authenticateCommand         = new DelegateCommand(Authenticate);
            saveCommand = new DelegateCommand(Save);
            enableAutoDownloadCommand = new DelegateCommand(EnableAutoDownload);

            Load();
            view.Closed += ViewClosed;

            folderBrowser.PropertyChanged += FolderBrowserPropertyChanged;
        }
예제 #34
0
        static IProvider GetProviderImplementation(Data.Provider provider, ICatalogService service, ICrawlerService crawlerService)
        {
            IProvider retVal = null;
            switch (provider.ProviderID)
            {
                case 1:
                    retVal = new LinkShareFfpProvider();
                    break;
                case 2:
                    retVal = new LinkShareWebServiceProvider();
                    break;
                case 3:
                    retVal = new CommissionJunctionWebServiceProvider(provider, service, crawlerService);
                    break;
                default:
                    break;
            }

            return retVal;
        }
예제 #35
0
 public ManagerController(IShellService shellService, ISelectionService selectionService, ICrawlerService crawlerService, ISettingsService settingsService,
                          IManagerService managerService, ICrawlerFactory crawlerFactory, IBlogFactory blogFactory, Lazy <ManagerViewModel> managerViewModel)
 {
     this.shellService      = shellService;
     this.selectionService  = selectionService;
     this.crawlerService    = crawlerService;
     this.managerService    = managerService;
     this.managerViewModel  = managerViewModel;
     this.settingsService   = settingsService;
     CrawlerFactory         = crawlerFactory;
     BlogFactory            = blogFactory;
     addBlogCommand         = new AsyncDelegateCommand(AddBlog, CanAddBlog);
     removeBlogCommand      = new DelegateCommand(RemoveBlog, CanRemoveBlog);
     showFilesCommand       = new DelegateCommand(ShowFiles, CanShowFiles);
     visitBlogCommand       = new DelegateCommand(VisitBlog, CanVisitBlog);
     enqueueSelectedCommand = new DelegateCommand(EnqueueSelected, CanEnqueueSelected);
     loadLibraryCommand     = new AsyncDelegateCommand(LoadLibrary, CanLoadLibrary);
     listenClipboardCommand = new DelegateCommand(ListenClipboard);
     autoDownloadCommand    = new DelegateCommand(EnqueueAutoDownload, CanEnqueueAutoDownload);
     showDetailsCommand     = new DelegateCommand(ShowDetailsCommand);
 }
예제 #36
0
 public HomeController(IStoredLinkRepository storedLinkRepository, ICrawlerService crawlerService)
 {
     _storedLinkRepository = storedLinkRepository;
     _crawlerService = crawlerService;
 }
예제 #37
0
 public void AfterEach()
 {
     this.resultService = null;
     this.crawlerService = null;
 }
 public CommissionJunctionWebServiceProvider(Data.Provider provider, ICatalogService service, ICrawlerService crawlerService)
     : base(service)
 {
     this.crawlerService = crawlerService;
     this.provider = provider;
 }