示例#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));
     }
 }