Metalama / / Conceptual documentation / Creating aspects / Writing T# templates

Writing T# templates

Code templates in Metalama are written in a dialect of C# called T#. The syntax of T# is 100% compatible with C#, but T# is compiled differently.

This chapter contains the following articles:

Article Description
T# templates: overview This article introduces T#, the template language for Metalama.
Writing compile-time code This article describes which subset of the C# language can be used as compile-time code, and how templates with rich compile-time logic can be built.
Generating run-time code This article explains different techniques to generate run-time code dynamically.
Template parameters and type parameters This article explains how to pass parameters (including generic parameters) from the BuildAspect method to the template.
Generating System.Reflection objects This article explains how to generate run-time System.Reflection objects for compile-time Metalama.Framework.Code objects from a template.
Debugging aspects This article explains how to debug templates.