Properties of Domain Roles

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Properties of Domain Roles.

The properties in the following table are associated with a domain role. For information about domain roles, see Understanding Models, Classes and Relationships. For more information about how to use these properties, see Customizing and Extending a Domain-Specific Language.

PropertyDescriptionDefault
Collection TypeIf this role has multiplicity of 0..* or 1..*, this property customizes the generic type that is used to store the collection of links.(none) - LinkedElementCollection<T> is used
Custom AttributesAttributes that you specify here will be added as attributes to the generated code class.<none>
Is Property BrowsableIf True, and if the multiplicity of the relationship is 0..1 or 1..1, the role property can be browsed by the user in the Properties window. The property displays the name of the element at the other end of the relationship link.True
Is Property GeneratorIf True, a role property is generated for this role, which you can use to traverse the relationship in program code. If you set this false, you can traverse the relationship in a less efficient manner by using static methods of the domain relationship.True
Property Getter Access ModifierThe access modifier for the getter for the generated property (public, internal, private, protected, or protected internal).public
Property Setter Access ModifierThe access modifier for the setter for the generated property (public, internal, private, protected, or protected internal).public
MultiplicityThe number of model elements which can play the opposite role (0..1, 1..1, 0..*, or 1..*). If the multiplicity is 0..* or 1..*, then the generated property represents a collection; otherwise, the generated property represents a single model element.Depends on the relationship type and whether this is the source or target role in the relationship.
NameThe name of the domain role. This property can not contain whitespace.The name of the domain class of the role player for this role.
Propagates CopyDoNotPropagateCopy - The copied role player will have no copy of this link.

 PropagateCopyToLinkOnly - The copied link points to the existing opposite role player.

 PropagateCopyToLinkAndOppositeRolePlayer - The copied link points to a copy of the opposite role player.
PropagateCopyToLinkAndOppositeRolePlayer for the source roles of embeddings.

 DoNotPropagateCopy for other roles.

For more information, see Customizing Copy Behavior
Propagates DeleteTrue to delete the element that plays this role when the associated link is deleted.True for the target of an embedding role.

 False for other roles.

For more information, see Customizing Deletion Behavior.
Property NameThe name of the property generated in the code of the role player. This name cannot contain whitespace.The name of the opposite role if this role has a zero-to-one or a one-to-one multiplicity; otherwise, the pluralized name of the opposite role.
Role PlayerThe domain class of the element that can play this role in the relationship. This property is read-only.The domain class of the role player for this role.
NotesInformal notes that are associated with the domain role.<none>
CategoryThe category under which the generated property appears in the Properties window in the generated designer. If this property is empty, then the generated property appears under the Misc category<none>
DescriptionThe description that is used to document code and is used in the UI of the generated designer.

The description appears in the Intellisense tooltip for the generated property on the role player class.
Description for the full name of the role
Display NameThe name that is displayed in the generated designer for the domain role.The adjusted value of the Name property.
Help KeywordThe optional keyword that is used to index F1 help for the domain role.<none>
Property Display NameThe name that is displayed in the generated designer for the generated role property.The adjusted value of the Property Name property.
System_CAPS_ICON_note.jpg Note

The default value of a display name is based on the associated property value by inserting spaces before each upper-case character that is preceded by a lower-case character and that is not followed by another upper-case character.

Properties of Domain Relationships

Show: