Model mapping for C# (C# code)
ACS generates a code file for the Model when that Model scopes directly a Class, Data Type, Interface or Signal that is set up as parent file scoped, an Operation that is set up as a delegate, or a Type Definition whose construction is Enumeration.
ACS generates the child items, properties and tagged values of a Model as follows:
Child items:
If the Model owns Classes, ACS typically generates a code file for each Class. If an owned Class has its C# Parent File Scoped tag definition set to true, ACS does not generate a code file for the Class and the class is defined in a code file that is generated for the Model. For Class mapping information, see Class mapping
If the Model owns Data Types, ACS typically generates a code file for each Data Type. If an owned Data Type has its C# Parent File Scoped tag definition set to true, ACS does not generate a code file for the Data Type and the struct is defined in a code file that is generated for the Model. For Data Type mapping information, see Data type mapping
If the Model owns Interfaces, ACS typically generates a code file for each Interface. If an owned Interface has its C# Parent File Scoped tag definition set to true, ACS does not generate a code file for the Interface and the interface is defined in a code file that is generated for the Model. For Interface mapping information, see Interface mapping
If the Model owns Operations that are stereotyped by the «C# Delegate» stereotype, ACS generates a code file for the Model, in which code is generated for the delegate Operation. For Operation mapping information, click here Operation mapping
If the Model owns Packages, ACS generates a subfolder for each Package.
If the Model owns Signals, ACS generates a code file for each Signal. For Signal mapping information, see Signal mapping
If the Model owns Type Definitions whose Construction is Enumeration, ACS generates a code file for the Model, in which code is generated for the Type Definition. For Type Definition mapping information, see Definition mapping
All other Package scoped items are ignored.
Properties:
If a Description is specified and a code file is generated for the Model, ACS generates the text of the Model's Description property at the beginning of the code file. For information about how comments are generated, click here Generating code comments
ACS generates the Name property as the name of the code file, if one is generated.
* 
Note ACS may modify the code file name that is generated to make it valid for C#. You can specify the exact name to use through the CODE_GENERATION_NAME property of a Model. Tell me more...
Tag Definitions:
The «C# Model » stereotype applies the following Tag Definitions to a Model:
If a tagged value is specified for the C# Attributes tag definition, ACS generates the value as the attributes at the beginning of the code file that is generated for the Model (after the Model Description, any extern alias directives and using directives).
If a tagged value is specified for the C# Extern Alias Directives tag definition, ACS generates the value as the extern alias directives at the beginning of the code file that is generated for the Model (after the Model Description).
The tagged value of the read-only C# File tag definition is used for opening generated code files from Modeler. This value is set by ACS.
* 
Note that the tagged value of the derived C# File tag definition is stored in your computer's registry (not the model) – the path and file name you see does not apply to other users of the model.
If a tagged value is specified for the C# Using Directives tag definition, ACS generates the value as the using directives at the beginning of the code file that is generated for the Model (after the Model Description and any extern alias directives).