public ExchangeRateUpdateEventHandelr( ICurrencyRepository reository, IExchangeRateApiService exchangeRateApiService ) { _reository = reository; _exchangeRateApiService = exchangeRateApiService; }
public ExchangeRateUpdateBackgroundWorker(AbpAsyncTimer timer, IServiceScopeFactory serviceScopeFactory, ICurrencyRepository reository, IExchangeRateApiService exchangeRateApiService ) : base(timer, serviceScopeFactory) { _reository = reository; _exchangeRateApiService = exchangeRateApiService; // 每x小时更新一次汇率 Timer.Period = 12 * 3600; }
public CurrencyConverterService(IExchangeRateApiService exchangeRateApiCallService) { this.exchangeRateApiCallService = exchangeRateApiCallService ?? throw new ServiceException(nameof(exchangeRateApiCallService)); }