示例#1
0
        public void ScheduleRatesPoll()
        {
            var settings = _options.Value;
            var rate     = _rateReaderService.GetRate(settings.CurrencyRateRequestUrl);

            _rateRepositoryService.AddRate(rate);
        }
示例#2
0
 public Task Execute(IJobExecutionContext context)
 {
     return(Task.Run(() =>
     {
         var settings = _options.Value;
         var rate = _rateReaderService.GetRate(settings.CurrencyRateRequestUrl);
         _rateRepositoryService.AddRate(rate);
     }));
 }