Udostępnij za pośrednictwem


Enum Element (ProxyGen)

Represents a proxy enumeration for a COM or managed enumeration.

<Enum isExcluded = "true/false"
    newName = "Name of proxy enumeration"
    newNamespace = "Namepace of proxy enumeration"
    originalFullyQualifiedName = "Fully qualified name of original enumeration">
  <Attribute>...</Attribute>
  <EnumerationValue>...</EnumerationValue>
  <UnderlyingType>...</UnderlyingType>
</Enum>

Enum_Type

Attributes and Elements

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

Attributes

Attribute

Description

isExcluded

Optional xs:boolean attribute.

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

newName

Optional identifier_Type attribute.

The name of the proxy enumeration.

newNamespace

Optional name_Type attribute.

The namespace of the proxy enumeration.

originalFullyQualifiedName

Required xs:ID attribute.

The fully qualified name of the original enumeration in the host application's object model.

Child Elements

Element

Description

Attribute

Optional Attribute_Type element.

Represents an attribute that is applied to the enumeration.

EnumerationValue

Required element.

Represents a member of the enumeration.

UnderlyingType

Required UnderlyingType_Type element.

Describes the underlying type of the enumeration.

Parent Elements

Element

Description

Class Element for COMLibrary

Represents a proxy class for a COM class.

Class Element for ManagedLibrary

Represents a proxy class for a managed class.

COMLibrary

Represents the contents of a COM type library.

Exception

Represents a proxy exception for a managed exception.

Interface Element for COMLibrary

Represents a proxy interface for a COM interface.

Interface Element for ManagedLibrary

Represents a proxy interface for a managed interface.

ManagedLibrary

Represents the contents of a managed assembly.

Struct

Represents a proxy struct for a managed struct.

Example

The following example demonstrates an Enum element that represents a proxy enumeration named ShapeType.

<Enum originalFullyQualifiedName="ShapeApp.Proxy.ShapeType" 
    isExcluded="false"
    newNamespace="ShapeApp.Proxy">
  <UnderlyingType>
    <ExternalTypeReference isInterface="false" type="System.Int32" />
  </UnderlyingType>
  <EnumerationValue originalName="Circle" value="0" />
  <EnumerationValue originalName="Square" value="1" />
  <EnumerationValue originalName="Triangle" value="2" />
  <EnumerationValue originalName="Octagon" value="3" />
  <EnumerationValue originalName="Star" value="4" />
</Enum>

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