Reputation: 15
I have to create code for a "Configuration Manager". The idea is to have a file with all connections strings, paths to another configuration files, data base hostnames, users and passwords, etc. and access to that information with a some sort of configuration manager, to make it uniform across all modules in the code. It even could be a singleton object living in memory during the whole code execution (takes several hours).
I googled and search stackoverflow for something like this, but didn't really find anything useful. I don't need a big explanation or example, just a hint or idea to the direction I should take. Also, is it better to have the file in a xml or just an ini formats? The encryption isn't a concern as of now.
Thanks!
Upvotes: 0
Views: 976
Reputation: 26160
Something like ConfigParser should work. If you need something more customized then that allows, you'd need to provide more specifications for us to have an idea what to suggest.
Upvotes: 2