Пример #1
0
        public void MigrateOldPreferences()
        {
            var soberDate     = _preferences.Get(PreferenceConstants.SoberDate, DateTime.Today);
            var notifsEnabled = _preferences.Get(PreferenceConstants.NotificationsEnabled, false);
            var notifTime     = _preferences.Get(PreferenceConstants.NotificationTime, DateTime.MinValue);

            Set(PreferenceConstants.SoberDate, soberDate);
            Set(PreferenceConstants.NotificationsEnabled, notifsEnabled);
            Set(PreferenceConstants.NotificationTime, notifTime);

            _preferences.Clear();
        }
Пример #2
0
        public PullKeysTests()
        {
            DependencyInjectionConfig.Init();
            string zipDirectory = ServiceLocator.Current.GetInstance <IFileSystem>().CacheDirectory;

            if (!Directory.Exists(zipDirectory))
            {
                Directory.CreateDirectory(zipDirectory);
            }
            _helper = new ZipDownloaderHelper();

            _preferences    = ServiceLocator.Current.GetInstance <IPreferences>();
            _logManager     = ServiceLocator.Current.GetInstance <ILoggingManager>();
            _developerTools = ServiceLocator.Current.GetInstance <IDeveloperToolsService>();
            _preferences.Clear();
            _logManager.DeleteAll();
            _developerTools.ClearAllFields();
        }
 public void ClearAll()
 {
     _preferences.Clear();
     _secureStorage.RemoveAll();
     _mobileDatabase.DeleteAll();
 }
 public virtual void RemoveAll()
 {
     _preferences.Clear();
 }
Пример #5
0
 public void Clear(string sharedName) =>
 _preferences.Clear(sharedName);