Delegate Element (ProxyGen)
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 isExcluded = "true/false"
newName = "Name of proxy delegate"
newNamespace = "Namespace of proxy delegate"
originalFullyQualifiedName = "Fully qualified name of original delegate">
<Attribute>...</Attribute>
<Parameter>...</Parameter>
<ReturnValueAttribute>...</ReturnValueAttribute>
<Type>...</Type>
</Delegate>
Delegate_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 delegate from the proxy code; false to include the type in the proxy code. The default is false. |
newName |
Optional identifier_Type attribute. The name of the proxy delegate. |
newNamespace |
Optional name_Type attribute. The namespace of the proxy delegate. |
originalFullyQualifiedName |
Required xs:ID attribute. The fully qualified name of the original delegate in the host application's object model. |
Child Elements
Element |
Description |
---|---|
Optional Attribute_Type element. Represents an attribute that is applied to the delegate. |
|
Optional Parameter_Type element. Represents a parameter of the delegate. |
|
Optional Attribute_Type element. Represents an attribute that is applied to the return value of the delegate. |
|
Required ArrayTypeReference_Type element. Describes the type of the return value of the delegate. The type can be an array. |
Parent Elements
Element |
Description |
---|---|
Represents a proxy class for a COM class. |
|
Represents a proxy class for a managed class. |
|
Represents the contents of a COM type library. |
|
Represents a proxy interface for a COM interface. |
|
Represents a proxy interface for a managed interface. |
|
Represents a proxy struct for a managed struct. |
Example
The following example demonstrates a Delegate element. This element represents a proxy delegate that handles a COM event.
<Delegate originalFullyQualifiedName="ShapeApp.Proxy._IDrawingEvents.Closed"
newName="ClosedEventHandler" isExcluded="false"
newNamespace="ShapeApp.Proxy">
<Parameter originalName="sender">
<Attribute>
<Type>
<ExternalTypeReference isInterface="false" type="System.Runtime.InteropServices.MarshalAsAttribute" />
</Type>
<Parameter value="IDispatch">
<Type>
<ExternalTypeReference isInterface="false" type="System.Runtime.InteropServices.UnmanagedType" />
</Type>
</Parameter>
</Attribute>
<Type>
<ExternalTypeReference isInterface="false" type="System.Object" />
</Type>
</Parameter>
<Type>
<ExternalTypeReference isInterface="false" type="System.Void" />
</Type>
</Delegate>
Element Information
Namespace |
https://schemas.microsoft.com/vsta/2008/01/ProxyGenDescriptor |
Schema name |
ProxyGen Descriptor |
Validation file |
ProxyGenDescriptorv2.xsd |
Can be empty |
No |