Using .NET types

The simplest way to define metadata is with a scalar .NET type such as System.String or System.Boolean. Declare the property with a Property directive:

<%@ Property Name="ClassName" Type="System.String" Category="Context" Description="The name of the class to be generated." %>

CodeSmith Generator lets the user edit scalar types directly in the property grid when they run the template.

To limit a property to a fixed set of choices, base it on an enumeration; see Declaring an enumerated property. For types that need a richer editor, see Custom metadata sources.