Proxy for a IPhotoSource that's been cached in the sqlite database.
상속: IPhotoSource
예제 #1
0
 public void RegisterPhotoSource (ICacheablePhotoSource source)
 {
     if (source.CacheId != 0) {
         throw new Exception ("Can't register an already registered source!");
     }
     
     var cache = new SqliteCachedPhotoSource (source);
     cache.AvailabilityChanged += OnCachedSourceAvailabilityChanged;
     source_provider.Save (cache);
     
     source.CacheId = cache.CacheId;
     source.Persist ();
     cache.Start (this);
 }
예제 #2
0
 internal StartPhotoSourceJob (SqliteCachedPhotoSource source, IPhotoSourceCache cache)
 {
     Source = source;
     Cache = cache;
     Title = String.Format ("Starting cached source: {0}/{1}", Source.SourceType, Source.CacheId);
 }