NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

5.2 Attribute sections

Attributes are specified in attribute sections. Each attribute section is surrounded in angle brackets, with multiple attributes specified in a comma-separated list. The order in which attributes are specified and the manner in which they are arranged is not significant. Attributes may be single use only. If a single use attribute is specified more than once in an attribute section, it is an error. Attributes may also restrict the kinds of declarations they may be used on. If an attribute is specified on a kind of declaration it does not support, it is an error.

Attributes may be inheritable. A derived type inherits all inheritable attributes defined on its base type. If the derived type declares an attribute of the same type as an inherited attribute, the derived declaration overrides the base declaration if it single-use. Multi-use attributes are always aggregated.

An attribute consists of an optional attribute modifier, an attribute name and an optional list of positional arguments and data member/property initializers. If there are no parameters or initializers, the parenthesis may be omitted. If an attribute has a modifier, it must be in an attribute block at the top of a source file. Unlike a normal constructor invocation, if an attribute has no parameters, it may omit the parenthesis.

Attributes ::= < AttributeList >
AttributeList ::=
 Attribute |
 AttributeList , Attribute
Attribute ::= [ AttributeModifier : ] AttributeName [ ( [ AttributeArguments ] ) ]
AttributeModifier ::= Assembly | Module