예제 #1
0
        public List <Currency> GetToday()
        {
            var url          = new Uri(string.Format(xmlUrl, "today"));
            var jsonData     = webClient.DownloadString(url);
            var deserializer = serializer.Deserializer <Tarih_Date>(jsonData);
            var result       = deserializer.Currency.Select(Currency.Map).ToList();

            return(result);
        }
예제 #2
0
        public Task <CurrencyModel[]> GetToday()
        {
            var url         = new Uri(string.Format(urlPattern, "today"));
            var data        = client.DownloadString(url);
            var deserialize = serializer.Deserializer <Tarih_Date>(data);
            var result      = deserialize.Currency.Select(CurrencyModel.Map).ToArray();

            return(Task.FromResult(result));
        }