DCSIMG
Nice wrapper for .NET ConfigurationManager - Rotem Bloom's Blog

Rotem Bloom's Blog

Share knowledge on .NET and web development

News

About Me

Glad to help and share knowledge on .NET and also huge fan of Dream Theater.

Contact me via messenger

View Rotem Bloom's profile on LinkedIn

Dream Theater Pics

Blogs I Read

Nice wrapper for .NET ConfigurationManager

I wrote a nice and useful wrapper class for .NET ConfigurationManager class. What this class gives you:

  1. Internal cache for reading AppSettings values. The cache refresh itself when the file is change on the fly. (Just use Setting.Watch())
  2. You can read parameters from AppSettings section with generic support and also forward default value.
  3. You can read connection string and more...
Basically you can start working with the wrapper class instead of using .NET ConfigurationManager class. Of course you can change and add more functionality to the class that will suit your needs.

For example you can use the code:

bool isAllow = Setting.Get<bool>("MyAppSettingsKey");

Please add your comments, You can download the code from here.

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: