C# code and modeling correspondence
Overview
Listed below are common concepts used in C# development, together with the way they can be expressed in Objecteering.
Notions on a package
|
C#
notion |
UML
model mapping |
|
generating a sub-package from a larger modeling project, without having the entire package hierarchy |
the {CsName} tagged value with the parameter containing the complete name on the package in question. |
Notions on a class
|
C#
notion |
UML
model mapping |
|
interface |
“interface” stereotype on a class. |
|
abstract class |
"Abstract" field of a class. |
|
sealed class |
"Leaf" field of a class. |
|
generalization |
class generalization, or {CsExtends} tagged value. |
|
interface implementation |
implementation link, or {CsImplements} tagged value. |
|
imports classes |
use and reference links of its package, or {csUse} tagged value on the class and its package. |
|
class invariant |
constraint on class, stereotyped “CsInvariant”. |
Notions on an operation
|
C#
notion |
UML
model mapping |
|
public visibility |
Public value of the Visibility field on an operation. |
|
protected visibility |
Protected value of the Visibility field on an operation. |
|
private visibility |
Private value of the Visibility field on an operation. |
|
internal visibility |
|
|
protected internal visibility |
|
|
constructor |
“create” stereotype on an operation. |
|
finalize() method |
“destroy” stereotype on an operation. |
|
abstract |
"Abstract" operation field. |
|
static |
"Class" operation field. |
|
sealed |
"Cannot be specialized" operation field or {CsSealed} tagged value. |
|
extern |
Notions on an attribute
|
C#
notion |
UML
model mapping |
|
visibility |
same mapping process as for operations. |
|
static |
Class field of an attribute. |
|
Sealed |