Sep 9, 2009

Code Generation with T4

The text templating engine (tt or t4) is part of the Visual Studio environment for quite a few version now. It can be used to generate static wrapper classes for workflow in and out arguments.

Static code (text) sections are mixed with dynamic C# code to emit the target file. My 3 minute sample here:

image

Syntax highlighting comes from tangible engineering VS plugin (a free edition exists).

No comments:

Post a Comment