예제 #1
0
 public void WriteSetting(BackupSetting key, string value)
 {
     using (var fs = GetSettingsFileStream())
     {
         WriteSettingsFileStreamAsync(SettingsFileTools.WriteSetting(fs, key, value));
     }
 }
예제 #2
0
 public Dictionary <BackupSetting, string> ReadSettings()
 {
     using (var fs = GetSettingsFileStream())
     {
         return(SettingsFileTools.ReadSettings(fs));
     }
 }
예제 #3
0
 public string ReadSetting(BackupSetting key)
 {
     using (var fs = GetSettingsFileStream())
     {
         return(SettingsFileTools.ReadSetting(fs, key));
     }
 }
예제 #4
0
 public void ClearSetting(BackupSetting key)
 {
     using (var fs = GetSettingsFileStream())
     {
         WriteSettingsFileStreamAsync(SettingsFileTools.ClearSetting(fs, key));
     }
 }
예제 #5
0
 public void ClearSetting(BackupSetting key)
 {
     using (var fs = GetSettingsFileStream())
     {
         SettingsFileTools.ClearSetting(fs, key);
     }
 }
예제 #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));
     }
 }