CodeSmith.BaseTemplates
The CodeSmith.BaseTemplates sample project contains two classes that inherit from CodeTemplate. These classes can be used to add functionality to your templates by referencing them in the Inherits attribute of the CodeTemplate directive:
- The OutputFileCodeTemplate class saves its output to a file
- The SqlCodeTemplate class includes utility functions for working with data stored in a SQL database
In addition, the project includes two utility classes that you can use via a reference to the CodeSmith.BaseTemplates assembly:
- The StringUtil class includes methods for working with strings
- The ScriptUtility class includes methods for working with SQL scripts
You can find this project in the SampleProjects/BaseTemplates folder.