public void WriteConfigurationFile() { var configuration = new ConfigurationWriter(this); configuration.Validate(); configuration.Save(); }
public void RestoreAppConfig(string sourcePath) { if (sourcePath == null) { return; } var configFile = $"{Service.ExePath}.config"; File.Copy(sourcePath, configFile, true); // Ensure Transport type is correct and populate the config with common settings even if they are defaults // Will not clobber other settings in the config var configWriter = new ConfigurationWriter(this); configWriter.Validate(); configWriter.Save(); }