I don't like this line very much
CatalogNameUsage catalogNameUsageSetting = (CatalogNameUsage)(int)configReader.GetValue("CatalogNameUsageSetting", typeof(int));
The problem with it is, that it would throw an (internal) exception when there is no CatalogNameUsageSetting defined which is a problem:
- if you have debugger set to catch thrown exceptions
- performance (not a huge one of course)
I would preffer something like this:
string value = ConfigurationManager.AppSettings["CatalogNameUsageSetting"];
if (value != null) {
CatalogNameUsage catalogNameUsageSetting = (CatalogNameUsage)Convert.ToInt32(value);
The only downside is that you have to include System.Configuration assembly.