Beispiel #1
0
        static public async Task <CryptoListJsonModel> GetWebJson()
        {
            string json = string.Empty;
            CryptoListJsonModel cljm = JsonConvert.DeserializeObject <CryptoListJsonModel> ("{}");

            json = await WebGet(_URL);

            cljm = JsonConvert.DeserializeObject <CryptoListJsonModel> (json);
            return(cljm);
        }
Beispiel #2
0
        static public async Task <CryptoData> CryptoSelecter()
        {
            CryptoListJsonModel cljm = await CryptoListGetter();

            CryptoData cdata = null;
            string     readStr;

            Console.WriteLine("Plse Type Crypto Code(BTC, LTC, ZNY ..etc):");
            readStr = Console.ReadLine();
            cljm.SupportList.ForEach(delegate(CryptoData item) {
                if (item.Code.ToUpper() == readStr.ToUpper())
                {
                    cdata = item;
                }
            });
            if (cdata == null)
            {
                Console.WriteLine("Sorry. Not Support.");
                Environment.Exit(100);
            }
            return(cdata);
        }