public SettingsManager(ICachemanager cachemanager) { _cachemanager = cachemanager; BeginEditCommand = new RelayCommand(BeginEdit, () => !IsEditing); CommitEditCommand = new RelayCommand(CommitEdit, () => IsEditing); ResetDefaultCommand = new AsyncCommand(ResetDefault, () => IsEditing); CancelEditCommand = new RelayCommand(CancelEdit, () => IsEditing); _fbd = new FolderBrowserDialog(); SelectWorkingFolderCommand = new RelayCommand(SelectWorkingFolder); _commands = new[] { BeginEditCommand, CommitEditCommand, ResetDefaultCommand, CancelEditCommand }; Cultures = CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures).ToList(); }
private static void SetupCache() { IRawCacheRepository repository; if (string.IsNullOrEmpty(Settings.Default.RedisConnectionString)) { repository = new InMemoryRawCacheRepository(); } else { repository = new RedisRawCacheRepository(Settings.Default.RedisConnectionString); } CacheManager = new CacheManager(repository); _log.Info($"Cache provider initialized, working with repository {repository.GetType()}"); }