Share via


Interface Element for ManagedLibrary (ProxyGen)

Represents a proxy interface for a managed interface in the host application's object model.

<Interface isAddInEntryPoint = "true/false"
    isExcluded = "true/false"
    isStatic = "true/false"
    newName = "Name of proxy interface"
    newNamespace = "Namespace of proxy interface"
    originalFullyQualifiedName = "Fully qualified name of original managed interface">
  <Attribute>...</Attribute>
  <BaseType>...</BaseType>
  <Class>...</Class>
  <Constant>...</Constant>
  <Delegate>...</Delegate>
  <Enum>...</Enum>
  <Exception>...</Exception>
  <Event>...</Event>
  <ImplementedInterface>...</ImplementedInterface>
  <Interface>...</Interface>
  <Method>...</Method>
  <Property>...</Property>
  <Struct>...</Struct>
</Interface>

ManagedEntryPoint_Type

Attributes and Elements

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

Attributes

Attribute

Description

isAddInEntryPoint

Optional xs:boolean attribute.

true if the interface is an entry point in the proxy assembly; otherwise, false. The default is false.

For more information about entry points, see Defining Entry Points and Other Proxy Changes.

isExcluded

Optional xs:boolean attribute.

true to omit the interface from the proxy code; false to include the interface in the proxy code. The default is false.

isStatic

Optional xs:boolean attribute.

true to declare the interface using the static keyword; otherwise, false. The default is false.

newName

Optional identifier_Type attribute.

The name of the proxy interface.

newNamespace

Optional name_Type attribute.

The namespace of the proxy interface.

originalFullyQualifiedName

Required xs:ID attribute.

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

Child Elements

Element

Description

Attribute

Optional Attribute_Type element.

Represents an attribute that is applied to the interface.

BaseType

Optional TypeReference_Type element.

Describes the base type of the interface.

Class

Optional ManagedEntryPoint_Type element.

Represents a nested class that is defined in the interface.

Constant

Optional Constant_Type element.

Represents a constant that is defined in the interface.

Delegate

Optional Delegate_Type element.

Represents a delegate that is defined in the interface.

Enum

Optional Enum_Type element.

Represents an enumeration that is defined in the interface.

Exception

Optional Exception_Type element.

Represents an exception that is defined in the interface.

Event

Optional ManagedEvent_Type element.

Represents an event that is defined in the interface.

ImplementedInterface

Optional TypeReference_Type element.

Represents an interface that the interface implements.

Interface

Optional ManagedEntryPoint_Type element.

Represents a nested interface that is defined in the interface.

Method

Optional ManagedMethod_Type element.

Represents a method that is defined in the interface.

Property

Optional ManagedProperty_Type element.

Represents a property that is defined in the interface.

Struct

Optional ManagedType_Type element.

Represents a nested struct that is defined in the interface.

Parent Elements

Element

Description

ManagedLibrary

Describes the contents of the managed assembly that was passed to ProxyGen.exe.

Class

Represents the parent class in which the interface is defined.

Struct

Represents the parent struct in which the interface is defined.

Example

The following example demonstrates an Interface element that represents a proxy interface named Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.IShape. This interface includes a method named ContainsPoint, a property named Color, and an event named ColorChanged.

<Interface originalFullyQualifiedName="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.IShape"
    isExcluded="false"
    isAddInEntryPoint="false">
  <Method originalName="ContainsPoint" isExcluded="false">
    <Parameter originalName="point">
      <Type>
        <TypeReference type="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.Point" />
     </Type>
    </Parameter>
    <ReturnType>
      <ExternalTypeReference isInterface="false" type="System.Boolean" />
    </ReturnType>
  </Method>
  <Property originalName="Color" isExcluded="false">
    <Type>
      <TypeReference type="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.Color" />
    </Type>
    <Get isExcluded="false" />
    <Set isExcluded="false" />
  </Property>
  <Event originalName="ColorChanged" isExcluded="false">
    <Type>
      <TypeReference type="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.ColorChangedEventHandler" />
    </Type>
  </Event>
</Interface>

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