Пример #1
0
        public BrowseService(IControlsService controlsService,
                             IEventAggregator eventAggregator,
                             IScrapService scrapService,
                             IFilingService fileService,
                             IConnectionService connectionService,
                             IAudioService audioService,
                             IAppConfig config)
        {
            _config            = config;
            _controlsService   = controlsService;
            _scrapService      = scrapService;
            _fileService       = fileService;
            _connectionService = connectionService;
            _audioService      = audioService;
            _eventAggregator   = eventAggregator;

            if (Debugger.IsAttached) //save only for DEBUG
            {
                _audioTrialsLimit        = 10;
                _torSearchesCaptchaLimit = 10;
            }
            else
            {
                _audioTrialsLimit        = 3;
                _torSearchesCaptchaLimit = 2;
            }

            _eventAggregator.GetEvent <UpdateControlsEvent>().Subscribe(OnUpdateControls);
        }
Пример #2
0
 public ScrapController(ILogger <ScrapController> logger, IHttpContextAccessor httpContextAccessor, IScrapService scrapService, IMesHomeService mesHomeService)
 {
     _logger = logger;
     _httpContextAccessor = httpContextAccessor;
     _scrapService        = scrapService;
     _mesHomeService      = mesHomeService;
 }
Пример #3
0
 public DailyScrapRateController(
     IScrapService scrapService,
     IProductionService productionService
     )
 {
     _scrapService      = scrapService ?? throw new ArgumentNullException(nameof(scrapService));
     _productionService =
         productionService ?? throw new ArgumentNullException(nameof(productionService));
 }
Пример #4
0
        public async Task <List <Post> > GetRecommededPosts(IScrapService scrapService, AccountInfo user)
        {
            var recommendedPosts = new List <Post>();

            InitTopLocationHashtagPosts(user.Posts);
            recommendedPosts.AddRange(await GetTopLocationPosts(scrapService));
            recommendedPosts.AddRange(await GetTopHashtagPosts(scrapService));

            return(recommendedPosts);
        }
Пример #5
0
 public OeeService(
     IProductionService productionService,
     IScrapService scrapService,
     IDowntimeRepository downtimeRepository,
     FmsbOeeContext fmsbOeeContext
     )
 {
     _productionService =
         productionService ?? throw new ArgumentNullException(nameof(productionService));
     _scrapService       = scrapService ?? throw new ArgumentNullException(nameof(scrapService));
     _downtimeRepository =
         downtimeRepository ?? throw new ArgumentNullException(nameof(downtimeRepository));
     _fmsbOeeContext =
         fmsbOeeContext ?? throw new ArgumentNullException(nameof(fmsbOeeContext));
 }
Пример #6
0
        public UpdateService(IFileService dataServices,
                             IScrapService scrapDataService,
                             IComputeService computeDataService,
                             IDictionariesService dictionaryService,
                             IEventAggregator eventAggregator)
        {
            _degreeOfParallelism = 40;

            _eventAggregator    = eventAggregator;
            _dataServices       = dataServices;
            _dictionaryService  = dictionaryService;
            _scrapDataService   = scrapDataService;
            _computeDataService = computeDataService;

            Horses  = new List <LoadedHorse>();
            Jockeys = new List <LoadedJockey>();
            Races   = new List <RaceDetails>();
        }
Пример #7
0
        private async Task <IEnumerable <Post> > GetTopHashtagPosts(IScrapService scrapService)
        {
            var topHashtagList      = new List <string>();
            var topHashtagPostsList = new List <Post>();

            if (topLocationCountries.Count > 0)
            {
                var allCountriesList = allHashtags.ToList();
                allCountriesList.Sort((ht1, ht2) => ht1.Value.CompareTo(ht2.Value));
                topHashtagList.AddRange(allCountriesList.Select(kv => kv.Key).ToList().Take(5));
            }

            foreach (var hashtag in topHashtagList)
            {
                if (hashtag != null || hashtag != "")
                {
                    topHashtagPostsList.AddRange(await scrapService.GetHashtagPosts(hashtag));
                }
            }

            return(topHashtagPostsList);
        }
Пример #8
0
        private async Task <IEnumerable <Post> > GetTopLocationPosts(IScrapService scrapService)
        {
            var topCountriesList     = new List <LocationDto>();
            var topLocationPostsList = new List <Post>();

            if (topLocationCountries.Count > 0)
            {
                var allCountriesList = topLocationCountries.ToList();
                allCountriesList.Sort((ht1, ht2) => ht1.Value.CompareTo(ht2.Value));
                topCountriesList.AddRange(allCountriesList.Select(kv => kv.Key).ToList().Take(3));
            }

            foreach (var locationDto in topCountriesList)
            {
                if (locationDto.locationId != "")
                {
                    topLocationPostsList.AddRange(await scrapService.GetTopLocationPosts(locationDto.locationId));
                }
            }

            return(topLocationPostsList);
        }
 public DailyScrapByShiftController(IScrapService scrapService)
 {
     _scrapService = scrapService ?? throw new ArgumentNullException(nameof(scrapService));
 }
Пример #10
0
 public ExportScrapMergeBase(IScrapService ScrapService, ScrapMerge scrapMerges)
     : base(scrapMerges.type)
 {
     _ScrapService = ScrapService;
     _ScrapMerge   = scrapMerges;
 }
Пример #11
0
 public ScrapController(IAnnounceService announceService, IScrapService scrapService, IStreetParser streetParser)
 {
     _announceService = announceService;
     _scrapService    = scrapService;
     _streetParser    = streetParser;
 }
Пример #12
0
 public ScrapController(IScrapService scrapService, IMapper mapper)
 {
     _scrapService = scrapService;
     _mapper       = mapper;
 }
Пример #13
0
 public ExportScrapMerge(IScrapService scrapService, ScrapMerge scrapMerge)
     : base(scrapService, scrapMerge)
 {
 }
Пример #14
0
        // public HomeController(IScrapService scrapService, InstaWebDbContext context, IRecommenderService recommenderService)
        // {
        //     _scrapService = scrapService;
        //     _context = context;
        //     _recommenderService = recommenderService;
        // }

        public HomeController(IScrapService scrapService, IRecommenderService recommenderService)
        {
            _scrapService       = scrapService;
            _recommenderService = recommenderService;
        }
 public ScrapController(IScrapService mesScrapService)
 {
     _mesScrapService = mesScrapService;
 }