Ejemplo n.º 1
0
        private static T DownloadToCache <T>(string url)
        {
            string json   = HttpClientHelper.GetSingleItemRequest(url, new CancellationToken()).Result;
            T      result = ParseJson.Parse <T>(json, 0);

            SaveToCache(Paths.WFCDDataPaths["Cache" + TypeOf <T>().Name], result);
            return(result);
        }
Ejemplo n.º 2
0
 private static bool SaveToCache <T>(string path, T obj)
 {
     return(ParseJson.SaveData(path, obj));
 }
Ejemplo n.º 3
0
 private static T LoadFromCache <T>(string path)
 {
     return(ParseJson.LoadData <T>(path, 0));
 }