Пример #1
0
        internal static Cache Load()
        {
            var cache = new Cache();
            var serializer = new XmlSerializer(typeof(Cache));
            try
            {
                using (var reader = XmlTextReader.Create(GetCachePath()))
                {
                    cache = (Cache)serializer.Deserialize(reader);
                }
            }
            catch (Exception ex)
            {
            }

            return cache;
        }
Пример #2
0
 public void Initialize(Config config)
 {
     this._config = config;
     this._cache = Cache.Load();
 }