Transforming UML models into C# code
Use the UML-to-C# transformation to seed a C# project from Unified
Modeling Language (UML) specifications and generate C# code from a source
UML model.
- UML-to-C# transformations
Learn about UML-to-C# transformations, the C# Transformation profile, and best practices for using C# transformations. - Applying the C# and .Net WCF profiles
When you create a UML model, you can apply a profile to the model to control how the transformation generates code or artifacts. Adding a profile enables you to model additional elements that you cannot model with UML elements. To see a list of potential problems that can occur in the code that the transformation generates, apply the profile to the source model, apply the appropriate stereotypes to the model elements, and run the model validation feature. - Configuring UML-to-C# transformations
To specify the information that the transformation uses to generate the output that you expect, you use the New Transformation Configuration wizard and the transformation configuration editor, which guide you through the configuration. - Validating UML-to-C# transformation configurations
You can validate a transformation configuration to ensure that the values in the configuration are valid according to the requirements of a transformation. - Running and rerunning UML-to-C# transformations
You can run a transformation on an entire UML model or on a subset of model elements to generate output such as code. When you rerun the transformation after you change the source model or the generated code, you must identify the sections of generated code that you do not want the transformation to overwrite, and then protect them. Rerunning a transformation involves the same steps as running a transformation for the first time. - Renaming C# projects in Visual Studio
Once a Visual Studio 2005, 2008, or 2010 solution is imported into your Eclipse workspace, do not rename the C# project in Microsoft Visual Studio 2005 or broken references in the model can occur. If you need to rename the project, use the following procedure to rename C# projects and avoid breaking references in the model. - Stereotypes of the C# transformation profile
The C# transformation profile contains stereotypes that you can apply to classes, attributes, operations, interfaces, enumerations, and relationships. Each stereotype has a set of previously defined valid attributes and types. - Stereotypes of the .Net WCF profile
The .Net WCF profile contains stereotypes that you can apply to classes and other UML elements to represent Windows Communication Foundation (WCF) components. Each stereotype has a set of previously defined valid attributes and types. - UML elements transformed by the UML-to-C# transformation
The C# elements that the transformation transforms depends on the source UML elements and their characteristics.
Related information:
Feedback