Udostępnij za pośrednictwem


TypeReference Element (ProxyGen)

Describes a type that is defined in the proxy descriptor file. The type can be an array.

<TypeReference arrayInfo="Signature of the array"
    type="Fully qualified type name" />

ArrayInternalTypeReference_Type

Attributes and Elements

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

Attributes

Attribute

Description

arrayInfo

Optional array_Type attribute.

A regular expression that specifies a combination of brackets and commas that represents the array signature, if the type is an array. The signature describes the number of dimensions, and the number of sub-arrays if the array is a jagged array.

The following examples demonstrate usage of this attribute:

  • [] specifies a one-dimensional array.

  • [,] specifies a two-dimensional array.

  • [][] specifies a jagged array, consisting of an array of arrays.

type

Required xs:IDREF attribute.

The fully qualified name of the type.

Child Elements

None.

Parent Elements

Element

Description

ReturnType

Represents the type of the return value of a method.

Type

Represents a reference to a type that is used in the declaration of a member or parameter.

Example

The following example demonstrates a TypeReference element that describes 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

Not applicable

See Also

Concepts

ProxyGen Descriptor Schema Reference

Creating Proxies

Defining Entry Points and Other Proxy Changes