The T4 Templating Engine
Retired Content |
---|
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. |
T4 (Text Template Transformation Toolkit) is used to expand text templates using code written in C# or Visual Basic .NET. The T4TemplatingEngine component, highlighted in Figure 1, is a replaceable component of the Recipe Framework.
Figure 1: The T4 templating engine
The T4 templating engine takes text strings interleaved with scriptlets (expressions in Visual Basic or C#) as input and returns a string. The scriptlets are used dynamically create strings that are directly inserted into the output stream of the template. The most common use of T4 templating is generating code of a class or an XML file. For more information about the syntax of a T4 template, see Syntax of T4 Templates.
See also
Components of the Guidance Automation Toolkit | The Recipe Framework Foundation | The Wizard Framework Extension | Guidance Package Management UI