The PickledHedgehog Strongly Typed AppSettings generator is a webbased doodad (Thats a highly technical name) that will automatically generate a strongly typed (duh?) class and populate it from your config that you paste inside the big empty looking text box.
I decided to create this after having to manually go in and update my configuration helper repeatedly after adding new things into my config file, and becase, I hate getting the name of my configuration wrong - let me explain:
Say this is your config file:
And, for example, I wanted to pull out my copyright message, god knows why. Using the usual methods of .net, you would typically do:
But heres the thing - You can put anything you want in name. Anything at all. You can put shakesperes work in there, and the compiler will not complain. It will only complain when you hit the page / run the function, and you may not have even tested that function yet (Hey, sometimes even I dont fully test things)
Heres an example of when it goes wrong:
That may seem right, until you get to actually running the program, if you ever do. But "CopyrightMessage" is incorrect, if you have a look at the configuration I posted. Its "Message" infact.
With this doodad, you will get the following (Your milage will vary):
Now you cant put anything you want. You have no choice. You cant choose "CopyrightMessage", because the compiler will insult you and tell your mommy. Also, a side effect from this is the fact that your coding speed will be improved, since you wont need to go look up the actual config value etc, you can just have a looksy at this list.
It basically parses your XML, then generates the class underneath it...
As soon as my webhost finishes my upgrade, ill post a link.
Go
here
I plan to (eventually) do it for connection strings,
and also make it .net 1.* compatible, and perhaps some lovely syntax colouring etc...
30-AUG-06 - Iv added the ability to "Inherit" and override - decorator (?) pattern stuff, and a small sample underneath it explaining how to do it, and some lovely colours to the page.