slice2cs compiler supports a metadata directive that allows you to inject C# attribute specifications into the generated code. The metadata directive is
cs:attribute:. For example:
This results in the following code being generated for
You can apply this metadata directive to any Slice construct, such as structure, operation, or parameter definitions.
You can use this directive also at global level. For example:
This results in the following code being inserted after any
using directives and before any definitions: