Nice wrapper for .NET ConfigurationManager
I wrote a nice and useful wrapper class for .NET ConfigurationManager class. What this class gives you:
-
Internal cache for reading AppSettings values. The cache refresh itself when the file is change on the fly. (Just use Setting.Watch())
-
You can read parameters from AppSettings section with generic support and also forward default value.
-
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 f
unctionality 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.