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; }
public BookmarkService(BookmarkManager bookmarkManager, ApplicationSettingsService applicationSettingsService) { _bookmarkManager = bookmarkManager; _applicationSettingsService = applicationSettingsService; _protectedMemoryStorageKey = new SecureRandomGenerator().GetAlphaNumericString(256); _directory = ApplicationBuildConfig.UserDataPath; applicationSettingsService.LoadSettings(); _passwordStorage = new PasswordStorage(); _passwordStorage.Set(_protectedMemoryStorageKey, GetDefaultPassword()); }
public StartupService(ApplicationSettingsService applicationSettingsService, UpdateService updateService, UserInteractionService interactionService) { _applicationSettingsService = applicationSettingsService; _updateService = updateService; _interactionService = interactionService; }