West Wind Application Configuration
Load default app.config into an object to update in memory
Gravatar is a globally recognized avatar based on your email address. Load default app.config into an object to update in memory
  Sri Reddy
  All
  Aug 9, 2017 @ 01:20pm

I want to use WestWind Application Configuration to load my default app.config file. And, then manipulate the object in memory instead of saving the changes in the app.config file itself.

If I can do this, how? Is there any sample code to load existing app config into the object instead of using ConfigurationManager?

Currently, when i use default .net configuration object, any change straight goes into the actual config file instead of being in memory.

Any help would be appreciated.

Gravatar is a globally recognized avatar based on your email address. re: Load default app.config into an object to update in memory
  Rick Strahl
  Sri Reddy
  Aug 9, 2017 @ 02:09pm

The default behavior tries to write configuration data that's missing to the config file - if permissions allow. So if the config is not there or there are missing properties it'll write that for the configuration file provider. It won't however automatically write any changes you make unless you explicitly call .Write() on the object. So if that's happening somewhere your code is writing out the changes.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Load default app.config into an object to update in memory
  Sri Reddy
  Rick Strahl
  Aug 10, 2017 @ 10:50am

Thanks for the prompt response Rick. Appreciate it, I found that one of the workflows was actually calling the save method!

© 1996-2017