Ejemplo n.º 1
0
 public ImageCacheService(ApplicationSettingsService applicationSettingsService, ImageCacheRepository imageCacheRepository)
 {
     _imageCacheRepository = imageCacheRepository;
     if (_imageCacheRepository.CacheSize < MinCacheSize)
     {
         _imageCacheRepository.SetCacheSize(MinCacheSize, CacheTruncatePriority.RemoveLargest);
         applicationSettingsService.SaveSettings();
     }
     applicationSettingsService.OnSettingsSaved  += _applicationSettingsService_OnSettingsChanged;
     applicationSettingsService.OnSettingsLoaded += ApplicationSettingsService_OnSettingsLoaded;
 }