public void AutoAddPopularCoins(int limit) { var topCoins = coinMarketCapClient.TopCoins(limit); var allCoins = currencyService.GetAll(); foreach (var topCoin in topCoins) { if (allCoins.Any(x => x.Ticker == topCoin.Symbol)) { continue; } try { currencyService.Add(topCoin.Symbol, topCoin.Id); currencyService.AddAlternativeName(topCoin.Symbol, topCoin.Id); } catch (Exception e) { Trace.TraceError(e.Message); } } }
public IEnumerable <CoinMarketCapTicker> TopCoins(int limit) { // Not caching this return(decoratee.TopCoins(limit)); }