Share via


Set Element (ProxyGen)

Represents the set accessor of a property of a COM or managed type.

<Set invokeType = "Specifies how COM properties are invoked"
    isExcluded = "true/false">
  <Attribute>...</Attribute>
</Set>

Attributes and Elements

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

Attributes

Attribute

Description

invokeType

Required comInvokeType_Type attribute for properties of COM types. This attribute is not valid for properties of managed types.

This attribute can have one of the following values that specify how the set accessor will be invoked:

  • InvokeMethod

  • GetProperty

  • PutDispProperty

  • PutRefDispProperty

  • SetProperty

isExcluded

Optional xs:boolean attribute.

true to omit the set accessor from the proxy code; false to include the set accessor in the proxy code.

Child Elements

Element

Description

Attribute

Optional Attribute_Type element for properties of COM types. This element is not valid for properties of managed types.

Represents an attribute that is applied to the set accessor.

Parent Elements

Element

Description

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 Set element that represents the set accessor of a property named BackgroundColor.

<Property originalName="BackgroundColor" isExcluded="false">
  <Type>
    <TypeReference type="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.Color" />
  </Type>
  <Get isExcluded="false" />
  <Set isExcluded="false" />
</Property>

Element Information

Namespace

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

Schema name

ProxyGen Descriptor

Validation file

ProxyGenDescriptorv2.xsd

Can be empty

Yes

See Also

Concepts

ProxyGen Descriptor Schema Reference

Creating Proxies

Defining Entry Points and Other Proxy Changes