Nice wrapper for .NET ConfigurationManager

7 ביולי 2008

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.

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*