示例#1
0
 public FlatSeriesService(
     ILogger <FlatSeriesService> logger,
     IOtoDomRepository otoDomRepository)
 {
     this.logger           = logger;
     this.otoDomRepository = otoDomRepository;
 }
示例#2
0
 public EmailSummaryJob(
     IConfigurationRoot configuration,
     ILogger log,
     IMapper mapper,
     XtbInterface xtbService,
     IBinanceService binanceService,
     IEmailService emailService,
     IOtoDomRepository otoDomRepository,
     IPriceRepository priceRepository,
     IEmailGeneratorFactory emailGeneratorFactory)
 {
     _configuration         = configuration;
     _log                   = log;
     _mapper                = mapper;
     _xtbService            = xtbService;
     _binanceService        = binanceService;
     _emailService          = emailService;
     _otoDomRepository      = otoDomRepository;
     this._priceRepository  = priceRepository;
     _emailGeneratorFactory = emailGeneratorFactory;
 }
示例#3
0
        public OtodomFeedService(
            ConfigHelper configHelper,
            ILogger log,
            IScrapper otoDomScrapper,
            IOtoDomRepository otoDomRepository,
            IMapper mapper)
        {
            this.log              = log;
            this.otoDomScrapper   = otoDomScrapper;
            this.otoDomRepository = otoDomRepository;
            this.mapper           = mapper;

            if (configHelper == null || configHelper.OtodomFeedJobConfig == null)
            {
                throw new OtodomServiceException($"Missing configuration provider for {serviceName}.");
            }

            otodomUrl = configHelper.OtodomFeedJobConfig.AllOffersUrl;

            if (string.IsNullOrEmpty(otodomUrl))
            {
                throw new OtodomServiceException($"Missing configuration section [OtodomFeedJob:otodomUrlAllOffers] for {serviceName}.");
            }
        }