public static List <Cryptocurrency> GetAllAvailable() { var cache = new CryptocurrenciesCache(); var dictionary = (Dictionary <CryptocurrencyType, Cryptocurrency>)cache.Get(); return(dictionary.Values.Where(elem => elem.Available).ToList()); }
public static Cryptocurrency Get(CryptocurrencyType cryptocurrencyType) { var cache = new CryptocurrenciesCache(); var dictionary = (Dictionary <CryptocurrencyType, Cryptocurrency>)cache.Get(); //ERCFreezed is basically ERC20Token when it comes to token properties if (cryptocurrencyType == CryptocurrencyType.ERCFreezed) { cryptocurrencyType = CryptocurrencyType.ERC20Token; } return(dictionary[cryptocurrencyType]); }