public async Task ManualRefresh(CurrencyEnum selectedCurrency) { currencyInfos = CoinMarketDownloader.GetTop10(selectedCurrency).Result; NewFeed.Invoke(ProduceDataForListViewItems()); if (CurrencyInfoFeed != null) { CurrencyInfoFeed.Invoke(); } await fileSaver.SavaData(currencyInfos); }
public void ChangeSelectedCurrency(CurrencyEnum selectedCurrency) { this.selectedCurrency = selectedCurrency; if ((DateTime.Now - ((CurrencyInfo)currencyInfos.FirstOrDefault()).LastTimeUpdated) > new TimeSpan(0, 0, 30)) { if (CurrencyInfoFeed != null) { CurrencyInfoFeed.Invoke(); } NewFeed.Invoke(ProduceDataForListViewItems()); } }