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:
|
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 |
---|---|
Optional Attribute_Type element. Represents an attribute that is applied to the parameter. |
|
Optional element. Indicates that the default value of the parameter is null. If you include a DefaultNullValue element, you cannot include a DefaultValue element. |
|
Optional xs:string element. Specifies the default value of the parameter. If you include a DefaultValue element, you cannot include a DefaultNullValue element. |
|
Required ArrayTypeReference_Type element. Describes the type of the parameter. The type can be an array. |
Parent Elements
Element |
Description |
---|---|
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 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 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 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. |
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 |