One of the most monotonous parts of coding, for me, is creating a simple class in C#, all of its members and accessors, plus the unit tests. It's usually a good 20 minutes a week of brainless copy and pasting. Well, one day it occurred to that rather than spend 20 minutes once a week on something boring, I could spend 20 hours to automate that task. Was that a good trade-off? Almost certainly not.
Ladies and gentlemen, I present to you a little something that I call ClassCrafter (Code and Exe Exe only). You give it a couple of parameters, enter some info on the member variables for your class, and SHAZAM, you've got yourself a nicely formatted class and unit tests to boot.
Interface:
Result:
Now, I don't claim that this thing is flawless; there so many options related to object creation in the .NET Framework that some had to be left out. In particular, there are no options here for inheritance or for generics, but support for both wouldn't be so hard. Why do I share that with you? Well, it's because all of the code is included in the Zip file, so you are free to go completely hogwild.
This code has been released under the GNU Public License, and all of that kinda stuff. You must have v2.0 of the .NET framework to run this app, although the code is viewable whether you have the framework or not.
|
|