public void WriteSetting(BackupSetting key, string value) { using (var fs = GetSettingsFileStream()) { WriteSettingsFileStreamAsync(SettingsFileTools.WriteSetting(fs, key, value)); } }
public Dictionary <BackupSetting, string> ReadSettings() { using (var fs = GetSettingsFileStream()) { return(SettingsFileTools.ReadSettings(fs)); } }
public string ReadSetting(BackupSetting key) { using (var fs = GetSettingsFileStream()) { return(SettingsFileTools.ReadSetting(fs, key)); } }
public void ClearSetting(BackupSetting key) { using (var fs = GetSettingsFileStream()) { WriteSettingsFileStreamAsync(SettingsFileTools.ClearSetting(fs, key)); } }
public void ClearSetting(BackupSetting key) { using (var fs = GetSettingsFileStream()) { SettingsFileTools.ClearSetting(fs, key); } }
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)); } }