Parameter mapping for C# (C# code)
ACS generates an Operation's Parameters as part of a class, struct or interface member definition.
ACS generates the child items, properties and tagged values of a Parameter as follows.
Child items:
• A Parameter does not have any child items.
Properties:
• If a
Description is specified, ACS generates the text of a Parameter's Description property before the code generated for the parameter. For information about how comments are generated, click here
Generation of code comments (C# code) • The Default property is ignored.
• The Mechanism property determines whether ACS generates the Parameter with an out or ref argument:
◦ If the Mechanism is set to Out, ACS generates the Parameter with an out argument.
◦ If the Mechanism is set to 'In and Out', ACS generates the Parameter with a ref argument.
◦ If the Mechanism is set to In, ACS generates the Parameter without an out or ref argument.
• ACS generates the Name property as the identifier of the parameter in the code.
| ACS may modify the Parameter name that is added to the code to make it valid for C#. You can specify the exact Parameter name to add to the code for a method, indexer or delegate through the CODE_GENERATION_NAME property of an Operation. Tell me more... |
• ACS generates the Type property as the type of the parameter, unless a delegate is specified through the C# Delegate Type tag definition.
Tag Definitions:
If the «C# Parameter» stereotype is applied to the Parameter, you can specify attributes and actual parameters for the parameter. The «C# Parameter» stereotype applies the following Tag Definitions to a Parameter:
• If the type of the parameter is a generic type, ACS generates the tagged value of the C# Actual Parameters tag definition as the type arguments for the generic type.
• If a value is set for the tagged value of the C# Attributes tag definition, ACS generates the value as the attributes of the parameter.
• If the tagged value of the C# Delegate Type tag definition references an Operation, ACS generates the value as type of the parameter.
• If the tagged value of the C# Needs Qualified Type tag definition is set to True, ACS generates the parameter's type using its fully qualified name, rather than its unqualified name.
• If the tagged value of the C# This tag definition is set to True, the Parameter is owned by a static method and the Parameter is the first Parameter in the list, ACS generates the Parameter as an extension parameter method using the 'this' modifier instead of 'out', 'inout' or 'ref'.