Enterprise Architect supports the round trip engineering of C#, where the following conventions are used.
Stereotypes
Stereotype |
Applies to |
Corresponds To |
enumeration |
Class |
An enum type. |
struct |
Class |
A struct type. |
indexer |
Operation |
A property acting as an index for this class. |
event |
Operation |
An event. |
property |
Operation |
A property possibly containing both read and write code. |
Tagged Values
Tag |
Applies to |
Corresponds To |
unsafe |
Class, Interface, Operation |
The unsafe keyword. |
partial |
Class, Interface |
The partial keyword. |
static |
Class |
The static keyword. |
new |
Class, Interface, Operation |
The new keyword. |
genericConstraints |
Templated Class or Interface, Operation with tag generic. |
The constraints on the generic parameters of this type or operation. |
const |
Attribute |
The const keyword. |
delegate |
Operation |
The delegate keyword. |
extern |
Operation |
The extern keyword. |
generic |
Operation |
The generic parameters for this Operation. |
sealed |
Operation |
The sealed keyword. |
override |
Operation |
The override keyword. |
virtual |
Operation |
The virtual keyword. |
Implements |
Operation |
The name of the method this implements, including the interface name. |
ImplementsExplicit |
Operation |
The presence of the source interface name in this method declaration. |
initializer |
Operation |
A constructor initialization list. |
params |
Parameter |
A parameter list using the params keyword. |
attribute_name |
Operation with stereotype property or event |
The name of the variable behind this property or event. |
readonly |
Operation with stereotype property |
This property only defining read code. |
writeonly |
Operation with stereotype property |
This property only defining write code. |
Other Conventions
· | Namespaces are generated for each package below a namespace root |
· | The Const property of an attribute corresponds to the readonly keyword, while the tag const corresponds to the const keyword |
· | The value of inout for the Kind property of a parameter corresponds to the ref keyword |
· | The value of out for the Kind property of a parameter corresponds to the out keyword |
· | Partial classes can be modeled as two separate classes with the partial tag |
· | The Is Leaf property of a class corresponds to the sealed keyword. |
See Also