Ejemplo n.º 1
0
 public void WriteSetting(BackupSetting key, string value)
 {
     using (var fs = GetSettingsFileStream())
     {
         WriteSettingsFileStreamAsync(SettingsFileTools.WriteSetting(fs, key, value));
     }
 }
Ejemplo n.º 2
0
 public Dictionary <BackupSetting, string> ReadSettings()
 {
     using (var fs = GetSettingsFileStream())
     {
         return(SettingsFileTools.ReadSettings(fs));
     }
 }
Ejemplo n.º 3
0
 public string ReadSetting(BackupSetting key)
 {
     using (var fs = GetSettingsFileStream())
     {
         return(SettingsFileTools.ReadSetting(fs, key));
     }
 }
Ejemplo n.º 4
0
 public void ClearSetting(BackupSetting key)
 {
     using (var fs = GetSettingsFileStream())
     {
         WriteSettingsFileStreamAsync(SettingsFileTools.ClearSetting(fs, key));
     }
 }
Ejemplo n.º 5
0
 public void ClearSetting(BackupSetting key)
 {
     using (var fs = GetSettingsFileStream())
     {
         SettingsFileTools.ClearSetting(fs, key);
     }
 }
Ejemplo n.º 6
0
 public void WriteSetting(BackupSetting key, string value)
 {
     try
     {
         using Stream fs = GetSettingsFileStream();
         WriteSettingsFileStream(SettingsFileTools.WriteSetting(fs, key, value));
     }
     catch (Exception)
     {
         WriteSettingsFileStream(SettingsFileTools.WriteSetting(null, key, value));
     }
 }