Ejemplo n.º 1
0
        public static List <Cryptocurrency> GetAllAvailable()
        {
            var cache      = new CryptocurrenciesCache();
            var dictionary = (Dictionary <CryptocurrencyType, Cryptocurrency>)cache.Get();

            return(dictionary.Values.Where(elem => elem.Available).ToList());
        }
Ejemplo n.º 2
0
        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]);
        }