Share via


Type Element (ProxyGen)

Represents a reference to a type that is used in the declaration of a member or parameter. The type can be an array.

<Type>
    <ExternalTypeReference>...</ExternalTypeReference>
    <TypeReference>...</TypeReference>
</Type>

ArrayTypeReference_Type

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

Element

Description

ExternalTypeReference

Optional ArrayExternalTypeReference_Type element.

Describes a type that is not defined in the proxy descriptor file. You must include either an ExternalTypeReference or TypeReference element, but not both.

TypeReference

Optional ArrayInternalTypeReference_Type element.

Describes a type that is defined in the proxy descriptor file. You must include either a TypeReference or ExternalTypeReference element, but not both.

Parent Elements

Element

Description

Constant

Represents a constant that is defined in a proxy type for a COM or managed type.

Delegate

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.

Delegate Element for ManagedLibrary

Represents a proxy delegate for a managed delegate that is not defined in a parent class.

Field

Represents a field that is defined in a proxy type for a managed type.

NamedParameter

Represents a named parameter of an attribute's constructor.

Parameter

Represents a parameter of a method, property, or event that is defined in a proxy type for a COM or managed type.

Parameter Element for Attribute

Represents a positional parameter of an attribute's constructor.

Property Element for Class for COMLibrary

Represents a property that is defined in a proxy type for a COM type.

Property Element for Class for ManagedLibrary

Represents a property that is defined in a proxy type for a managed type.

Example

The following example demonstrates a Type element that represents the type of a parameter of a method named Load. The parameter is an array of Byte objects.

<Method originalName="Load" isExcluded="false">
  <Parameter originalName="savedState">
    <Type>
      <ExternalTypeReference isInterface="false" type="System.Byte" arrayInfo="[]" />
    </Type>
  </Parameter>
  <ReturnType>
    <TypeReference type="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.IShape" />
  </ReturnType>
</Method>

Element Information

Namespace

https://schemas.microsoft.com/vsta/2008/01/ProxyGenDescriptor

Schema name

ProxyGen Descriptor

Validation file

ProxyGenDescriptorv2.xsd

Can be empty

No

See Also

Concepts

ProxyGen Descriptor Schema Reference

Creating Proxies

Defining Entry Points and Other Proxy Changes