Overview

The tagged values provided by Modelio are used to adapt C# semantics to a UML model, in order to generate all C# notions accurately. For example, the notion of extern method in C# does not exist in UML. An {Extern} tagged value on a UML operation allows you to specify this characteristic on a model.

Note: Tagged values can be added to specific model elements directly through the "MDA Annotations" view.

Tagged values on an attribute
Name Parameters Role

Bind

List of generic type parameters

Associates one or several template parameters to the attribute’s reference type.

Const

N/A

Adds the "const" keyword to the attribute’s modifiers.

C# Name

Name

During the generation phase, the parameter of this tagged value takes precedence over the model name.

Full Name

N/A

Specifies that the type must be generated with its namespace.

Implementation Type

Collection

Defines the type of the collection that must be generated to instanciate the current attribute.

New

N/A

Adds the "new" keyword to the declaration.

No Code

N/A

Prevents this element from being generated.

No initial value

N/A

Indicates that this element shouldn’t be instanciated.

Nullable Type

N/A

Allows a variable to contain a value that is not defined.

Override

N/A

Adds the "override" keyword to the modifier’s declaration.

Pointer

N/A

Declares the attribute as being a pointer (for example, "int*myInteger;").

Read Only

N/A

Adds the "readonly" keyword to the attribute’s modifiers.

Sealed

N/A

Adds the "sealed" keyword to the modifiers.

Type

Array, ArrayList, …​

Defines the type of the collection that must be generated for the current attribute.

Type Expr

Text for specifying the attribute’s C# type

Generates the types that cannot be represented in Modelio (ex : int [ ] [ ]).

Unsafe

N/A

Adds the "unsafe" keyword.

Virtual

N/A

Declares the element as being virtual.

Visibility

The type of visibility (internal, protected internal, …​)

Defines custom visibility.

Volatile

N/A

Adds the "volatile" keyword to the attribute’s modifiers.

Getter Visibility

The type of visibility (internal, protected internal, …​)

Specifies the getter visibility.

Setter Visibility

The type of visibility (internal, protected internal, …​)

Specifies the setter visibility.

Tagged values on a navigable association
Name Parameters Role

Array Dimension

Integer

Specifies the number of dimensions of an array.

Bind

List of generic type parameters

Associates one or several template parameters to the attribute’s reference type.

Const

N/A

Adds the "const" keyword to the association’s modifiers.

C# Name

Name

During the generation phase, the parameter of this tagged value takes precedence over the model name.

Full Name

N/A

Specifies that the type must be generated with its namespace.

Implementation Type

Collection

Defines the type of the collection that must be generated to instanciate the current attribute.

Initial Value

Value

Specifies the initialization code for the association.

New

N/A

Adds the "new" keyword to the declaration.

No Code

N/A

Prevents this element from being generated.

No initial value

N/A

Indicates that this element shouldn’t be instanciated.

Override

N/A

Adds the "override" keyword to the modifier’s declaration.

Read Only

N/A

Adds the "readonly" keyword to the association’s modifiers.

Sealed

N/A

Adds the "sealed" keyword to the modifiers.

Type

Array, ArrayList, Hashtable, Queue, SortedList or Stack

Defines the type of the collection that must be generated for the current attribute.

Type Expr

Text specifying the attribute’s type

Generates types that cannot be represented in Modelio (ex : int [] []).

Unsafe

N/A

Adds the "unsafe" keyword.

Virtual

N/A

Declares the element as being virtual.

Visibility

The type of visibility (internal, protected internal, …​)

Defines custom visibility.

Volatile

N/A

Represents the C# keyword "volatile".

Tagged values on a class
Name Parameters Role

Extends

Name of the mother class

Forces class inheritance.

Implements

Name of the interface to implement

Forces the implementation of an interface.

C# Name

Name

During the generation phase, the parameter of this tagged value takes precedence over the model name.

New

N/A

Declares the class with the "new" keyword.

No Code

N/A

Prevents this element from being generated.

No Invariants

N/A

Prevents the generation of invariants for the class.

Partial

N/A

Authorizes the split into several files of one type.

Sealed

N/A

Adds the "sealed" keyword to the class.

Static

N/A

Indicates the class is static.

Struct

N/A

Defines the class as being structure.

Use

Names of the imported classes and packages

Imports non-modeled packages and classes.

Visibility

The type of visibility (internal, protected internal, …​)

Defines the visibility of the class.

Tagged values on a class «Cs Attribute»
Name Parameters Role

Allow Multiple

N/A

Allows multiple C# attributes on a field.

Inherited

N/A

Adds the C# attribute inheritance.

Target

The targets of the C# attribute

Adds an attribute target to the class if the class is stereotyped "CsAttribute"

Tagged values on an enumeration
Name Parameters Role

Enumeration Type

Type

Specifies the enumeration type.

Use

Names of the imported classes and packages

Imports non-modeled packages and classes.

Visibility

The type of visibility (internal, protected internal, …​)

Defines the visibility of the enumeration.

Tagged values on an enumeration literal
Name Parameters Role

Expression

Value

Specifies the enumeration literal value.

Tagged values on a generalization
Name Parameters Role

Bind

List of generic type parameters

Associates the template parameter(s) to the parent class' template parameter(s).

Full Name

N/A

Specifies that the generalization must be generated with the namespaced name of the super class.

Tagged values on an interface
Name Parameters Role

Extends

Name of the mother interface

Forces interface inheritance.

C# Name

Name

During the generation phase, the parameter of this tagged value takes precedence over the model name.

New

N/A

Declares the class with the "new" keyword.

No Code

N/A

Prevents this element from being generated.

No Invariants

N/A

Prevents the generation of invariants for the interface.

Partial

N/A

Authorizes the split into several files of one type.

Use

Names of the imported classes and packages

Imports non-modeled packages and classes.

Visibility

The type of visibility (internal, protected internal, …​)

Defines the visibility of the interface.

Tagged values on an operation
Name Parameters Role

Extension

Extension

Defines the method as being an extension of an existing type.

Extern

N/A

Declares the extern operation.

C# Name

Name

During the generation phase, the parameter of this tagged value takes precedence over the model name.

New

N/A

Adds the "new" keyword to the declaration.

No Code

N/A

Prevents this element from being generated.

No Invariants

N/A

Prevents the generation of invariants for the operation.

Override

N/A

Adds the "override" keyword to the modifier’s declaration.

Partial

N/A

Authorizes the breakdown of a method into two parts: the definition and the implementation.

Thrown Exceptions

Exception names

Defines the method thrown types.

Unsafe

N/A

Adds the "unsafe" keyword.

Virtual

N/A

Declares the element as being virtual.

Visibility

The type of visibility (internal, protected internal, …​)

Defines custom visibility.

Tagged values on a package
Name Parameters Role

Directory Name

Name of the directory

During the generation phase, the parameter of this tagged value takes precedence over the modeling name for the generated directory.

C# Name

Name

During the generation phase, the parameter of this tagged value takes precedence over the model name.

Extern

N/A

Indicates this element represents an external package, preventing it from being generated.

No Code

N/A

Prevents this element from being generated.

No Directory

N/A

Prevents the generation of a directory for the package.

No Namespace

N/A

Prevents generation of the name of the namespace for the annotated package.

Root

N/A

Indicates that the annotated package is the root generation node for your project.

Use

Names of the imported namespace

Forces a package dependency.

Tagged values on a parameter
Name Parameters Role

Bind

Bound types on the parameter

Specifies the types bound by a generic parameter.

C# Name

Name

During the generation phase, the parameter of this tagged value takes precedence over the model name.

Full Name

N/A

Specifies that the type must be generated with its namespace.

Nullable Type

N/A

Allows a variable to contain a value that is not defined.

Params

N/A

Supports the "params" parameter passing modes (variable number of arguments).

Pointer

N/A

Declares the parameter as being a pointer (for example, "int *myInteger").

Type Expr

Text specifying the parameter’s type

Generates the types that cannot be represented in Modelio (ex : int [] []).

Tagged values on a realization
Name Parameters Role

Bind

List of generic type parameters

Associates the template parameter(s) to the parent class' template parameter(s).

Full Name

N/A

Specifies that the realization must be generated with the namespaced name of the interface.

Tagged values on a signal
Name Parameters Role

Bind

Bound types on the signal

Specifies the types bound by a generic signal.

C# Name

Name

During the generation phase, the parameter of this tagged value takes precedence over the model name.

No Code

N/A

Prevents this element from being generated.

Static

N/A

Adds the static keyword.

Type Expr

Text for specifying the Signal’s C# type

Generates the types that cannot be represented in Modelio.

Virtual

N/A

Declares the element as being virtual.

Visibility

The type of visibility (internal, protected internal, …​)

Defines the visibility of the signal.

Tagged values on a template parameter
Name Parameters Role

Class Constraint

N/A

Forces the type argument to be a reference type.

Implement Constraint

Name(s) of the interface(s) to implement

Forces the type argument to implement the specified interface.

Naked Constraint

Name(s) of the template parameter(s)

Forces the type argument to be the delivered argument or a derivative.

New Constraint

N/A

Forces the type argument to have a public constructor with no parameters.

Struct Constraint

N/A

Forces the type argument to be a value type.