How to: Add a Named Domain Class to a Domain-Specific Language Definition
A named domain class resembles an unnamed domain class except that its Name property is set to true. When a domain class is named, its Name property is used as a moniker key during XML serialization.
As with unnamed domain classes, you can add and define named domain classes in a domain-specific language definition to represent classes in that domain-specific language.
After you have defined your domain classes in your domain-specific language definition, you might want to establish relationships among them. For more information, see How to: Add an Embedding Relationship to a Domain-Specific Language Definition, How to: Add a Reference Relationship to a Domain-Specific Language Definition, and How to: Add Inheritance to a Definition.
You will also need to map the named domain class to a shape, such as a geometry or image shape, to establish how the domain class will appear in the generated designer. For more information, see Defining Diagram Elements and How to: Map Elements By Using the Diagram Element Map Tool.
To add a named domain class to a domain-specific language definition
In the Toolbox, on the Dsl Designer tab, drag a named domain class onto the diagram surface of the Domain-Specific Language Designer.
A named domain class that is named DomainClass1 is created in the designer definition under the Classes and Relationships swimlane.
The named domain class that you just created includes a collapsible Domain Properties listing, which includes the Name domain property of type String. You can modify this domain property and add additional domain properties. For more information, see How to: Add a Domain Property.
In the Properties window, set the properties for the domain class. For more information, see Domain Class and Named Domain Class (Domain-Specific Language Designer).
See Also
Concepts
Defining Classes and Relationships
Domain-Specific Language Designer Terminology Overview