Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Write entire configuration to source files #27

Open
donvreug opened this issue May 13, 2017 · 1 comment
Open

Write entire configuration to source files #27

donvreug opened this issue May 13, 2017 · 1 comment

Comments

@donvreug
Copy link

I am using Nett.Coma.

Q: Is there a way to write the entire current configuration object to its local source files?

My scenario is thus:

I want to be able to introduce and remove settings following a software publishing update. To do this I will need to merge the local configuration with the new one, ensuring common settings are kept but new ones added and if a setting is no longer in the new config it gets removed form the local config. So I merge the configurations as such:

var config = Config.Create(() => new ConfigSettings(), defaultAppSettings, defaultUserSettings,
localAppSettings, localUserSettings);

Where defaultAppSettings, defaultUserSettings, localAppSettings, and localUserSettings are strings.

Is this correct?

Now I would like to save the merged configuration back to the local files. Can I do this in one operation?

Or is there already a way to do this 'updating' in Nett.Coma?

@paiden
Copy link
Owner

paiden commented May 14, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants