C# code generation

C# code generation consists of producing C# files for a model’s classes using the correspondence between C# notions and modeling notions. Before actually proceeding with generation, it may be necessary to specify that classes or packages are C# elements using stereotypes and to annotate the model using tagged values, and to further define the model using notes.

Modelio C# Designer has a default strategy for generating parameter and attribute declarations. It converts UML types into C# types, ensuring modern code generation, based on the C# collections framework. Other translations can be implemented easily, using the Modelio C# Designer customization file.

Compilation

Compilation consists of producing EXE or DLL files from generated C# files.

Compilation can be run from components modeled in Modelio.

Generating documentation

This operation uses the documentation option (/doc) of the compiler tool to produce HTML files from the generated C# files, and is, therefore, related to the generated C# files. Special notes, inserted during the modeling phase and taken into account by the code generation process, are then used.

Reverse engineering

Reverse engineering consists of incorporating classes belonging to existing libraries or source code into a model.  This allows you, during the modeling phase, to:

  • specialize these classes

  • implement them

  • create associations towards them

  • create attributes which have one of these classes as their type

  • create operation parameters which have one of these classes as their type

Visual Studio project bridge

This feature allows Visual Studio project files (.csproj) to be created, edited, updated and built from Modelio.