Share via


ReturnType Element (ProxyGen)

Represents the type of the return value of a method. The type can be an array.

<ReturnType>
  <ExternalTypeReference>...</ExternalTypeReference>
  <TypeReference>...</TypeReference>
</ReturnType>

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

Method Element for Class for COMLibrary

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

Method Element for Class for ManagedLibrary

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

Example

The following example demonstrates a ReturnType element that represents the type of the return value of a method named Load. The type of the return value is a Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.IShape interface. Because the reference to this interface is in a TypeReference element rather than an ExternalTypeReference element, this interface must be defined elsewhere in the same proxy descriptor file.

<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