コード例 #1
0
 public async Task <IEnumerable <CryptoCurrency> > Handle(GetAllCryptoCurrenciesQuery request, CancellationToken cancellationToken)
 {
     return(await _cryptoCurrencyService.GetAllCurrencies().ConfigureAwait(false));
 }
コード例 #2
0
 public IActionResult Get()
 {
     return(Ok(_coinService.GetAllCurrencies()));
 }
コード例 #3
0
        public override async Task DoWork(CancellationToken cancellationToken)
        {
            var currencies = await _cryptoCurrencyService.GetAllCurrencies();

            await _cryptoCurrencyService.FetchLatestQuoteAndSetCache(currencies.Select(c => c.Symbol).ToArray());
        }