Beispiel #1
0
        /// <summary>
        /// Load the cached data
        /// </summary>
        /// <returns></returns>
        public TvdbData LoadUserDataFromCache()
        {
            List <TvdbMirror>   mirrors     = LoadMirrorListFromCache();
            List <TvdbLanguage> languages   = LoadLanguageListFromCache();
            DateTime            lastUpdated = LoadLastUpdatedFromCache();
            TvdbData            data        = new TvdbData(new List <TvdbSeries>(), languages, mirrors);

            data.LastUpdated = lastUpdated;
            return(data);
        }
 /// <summary>
 /// Saves all available data to cache
 /// </summary>
 /// <param name="_content"></param>
 public void SaveAllToCache(TvdbData _content)
 {
     SaveToCache(_content.LanguageList);
     SaveToCache(_content.Mirrors);
     SaveToCache(_content.LastUpdated);
     foreach (TvdbSeries s in _content.SeriesList)
     {
         SaveToCache(s);
     }
 }
        /// <summary>
        /// Loads all cached series from cache -> can take a while
        /// </summary>
        /// <returns></returns>
        public TvdbData LoadUserDataFromCache()
        {
            TvdbData data = new TvdbData();

            data.LanguageList = LoadLanguageListFromCache();
            data.Mirrors      = LoadMirrorListFromCache();
            if (data.SeriesList == null)
            {
                data.SeriesList = new List <TvdbSeries>();
            }
            return(data);
        }
 /// <summary>
 /// Saves all available data to cache
 /// </summary>
 /// <param name="_content"></param>
 public void SaveAllToCache(TvdbData _content)
 {
     SaveToCache(_content.LanguageList);
       SaveToCache(_content.Mirrors);
       SaveToCache(_content.LastUpdated);
       foreach (TvdbSeries s in _content.SeriesList)
       {
     SaveToCache(s);
       }
 }
 /// <summary>
 /// Load the cached data
 /// </summary>
 /// <returns></returns>
 public TvdbData LoadUserDataFromCache()
 {
     List<TvdbMirror> mirrors = LoadMirrorListFromCache();
       List<TvdbLanguage> languages = LoadLanguageListFromCache();
       DateTime lastUpdated = LoadLastUpdatedFromCache();
       TvdbData data = new TvdbData(new List<TvdbSeries>(), languages, mirrors);
       data.LastUpdated = lastUpdated;
       return data;
 }
Beispiel #6
0
 /// <summary>
 /// Loads all cached series from cache -> can take a while
 /// </summary>
 /// <returns></returns>
 public TvdbData LoadUserDataFromCache()
 {
     TvdbData data = new TvdbData();
       data.LanguageList = LoadLanguageListFromCache();
       data.Mirrors = LoadMirrorListFromCache();
       if (data.SeriesList == null) data.SeriesList = new List<TvdbSeries>();
       return data;
 }