Parameter Element (ProxyGen)

Represents a parameter of a member or delegate type.

<Parameter direction = "Parameter direction"
    isOptional = "true/false"
    isParamArray = "true/false"
    newName = "Name of parameter in proxy type"
    originalName = "Name of original parameter">
  <Attribute>...</Attribute>
  <DefaultNullValue>...</DefaultNullValue>
  <DefaultValue>...</DefaultValue>
  <Type>...</Type>
</Parameter>

Parameter_Type

Attributes and Elements

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

Attributes

Attribute

Description

direction

Optional paramDirection_Type attribute.

One of the following string values that specifies the direction of the parameter:

  • in

  • out

  • ref

isOptional

Optional xs:boolean attribute.

true if the parameter is optional; otherwise, false.

isParamArray

Optional xs:boolean attribute.

true if the parameter takes a variable number of arguments (that is, the parameter is declared with the params keyword); otherwise, false.

newName

Required identifier_Type attribute.

The new name of the parameter in the proxy code.

originalName

Required identifier_Type attribute.

The name of the original parameter in the host application's object model.

Child Elements

Element

Description

Attribute

Optional Attribute_Type element.

Represents an attribute that is applied to the parameter.

DefaultNullValue

Optional element.

Indicates that the default value of the parameter is null. If you include a DefaultNullValue element, you cannot include a DefaultValue element.

DefaultValue

Optional xs:string element.

Specifies the default value of the parameter. If you include a DefaultValue element, you cannot include a DefaultNullValue element.

Type

Required ArrayTypeReference_Type element.

Describes the type of the parameter. The type can be an array.

Parent Elements

Element

Description

Delegate Element

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.

Event Element for Class for COMLibrary

Represents an event that is defined in a proxy type for a COM type.

Event Element for Class for ManagedLibrary

Represents an event that is defined in a proxy type for a managed type.

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.

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 Parameter element that represents the parameter of a method named Load. The parameter is an array of System.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