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); }
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)); }