In two previous articles, I wrote an introduction for
CodeSmith that illustrated how to setup a template, along with another article
using the SchemaExplorer assembly. For the last article in the series, I want
to display a couple of useful templates that may help you when you develop your
own custom templates, or at least understand more about CodeSmith in general.
You probably know of something that you type over and over
again, and even though there are similarities with other pieces of code you
write, it is not quite the same. Coding it fresh is usually the best option.
Because of this, added time to development cycles occurs.
Enter CodeSmith tools. This suite of tools generates code
for you the way that you want it to appear; all that is required is to write
the template (it does not have templates that generate templates, that would be
chaos). Let us look at some examples.