Attribute Element (ProxyGen)
Represents an attribute of a type, member, or parameter.
<Attribute>
<NullParameter>...</NullParameter>
<Parameter>...</Parameter>
<NamedNullParameter>...</NamedNullParameter>
<NamedParameter>...</NamedParameter>
<Type>...</Type>
</Attribute>
Attribute_Type
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
None.
Child Elements
Element |
Description |
---|---|
Optional element. Represents a named parameter of the attribute's constructor that is passed the value null. This element must be located after the Parameter and NullParameter elements. |
|
Optional element. Represents a named parameter of the attribute's constructor. This element must be located after the Parameter and NullParameter elements. |
|
Optional element. Represents a positional parameter of the attribute's constructor that is passed the value null. This element must be located before the NamedParameter and NamedNullParameter elements. |
|
Optional element. Represents a positional parameter of the attribute's constructor. This element must be located before the NamedParameter and NamedNullParameter elements. |
|
Required TypeReference_Type element. Describes the type of the attribute. This element can be only the first or last child element. |
Parent Elements
Element |
Description |
---|---|
Represents a proxy class for a COM class. |
|
Represents a proxy class for a managed class. |
|
Represents a constant that is defined in a proxy type for a COM or managed type. |
|
Represents a proxy delegate for a managed delegate that is defined in a parent class. -or- Represents a proxy delegate that handles a COM event. |
|
Represents a proxy delegate for a managed delegate that is not defined in a parent class. |
|
Represents a proxy enumeration for a COM or managed enumeration. |
|
Represents a member in a proxy enumeration for a COM or managed enumeration. |
|
Represents an event that is defined in a proxy type for a COM type. |
|
Represents an event that is defined in a proxy type for a managed type. |
|
Represents a proxy exception for a managed exception. |
|
Represents a field that is defined in a proxy type for a managed type. |
|
Represents the get accessor of a property that is defined in a proxy type for a COM or managed type. |
|
Represents a proxy interface for a COM interface. |
|
Represents a proxy interface for a managed interface. |
|
Represents a method that is defined in a proxy type for a COM type. |
|
Represents a method that is defined in a proxy type for a managed type. |
|
Represents a parameter of a method, property, or event that is defined in a proxy type for a COM or managed type. |
|
Represents a property that is defined in a proxy type for a COM type. |
|
Represents a property that is defined in a proxy type for a managed type. |
|
Represents the set accessor of a property that is defined in a proxy type for a COM or managed type. |
|
Represents a proxy struct for a managed struct. |
Example
The following example demonstrates an Attribute element that represents an attribute of a get accessor for a property named FileName. This example applies the MarshalAsAttribute attribute to the get accessor.
<Property originalName="FileName" isExcluded="false" dispId="1">
<Type>
<ExternalTypeReference isInterface="false" type="System.String" />
</Type>
<Get isExcluded="false">
<Attribute>
<Type>
<ExternalTypeReference isInterface="false" type="System.Runtime.InteropServices.MarshalAsAttribute" />
</Type>
<Parameter value="BStr">
<Type>
<ExternalTypeReference isInterface="false" type="System.Runtime.InteropServices.UnmanagedType" />
</Type>
</Parameter>
</Attribute>
</Get>
</Property>
Element Information
Namespace |
https://schemas.microsoft.com/vsta/2008/01/ProxyGenDescriptor |
Schema name |
ProxyGen Descriptor |
Validation file |
ProxyGenDescriptorv2.xsd |
Can be empty |
No |