Delegate Element for ManagedLibrary (ProxyGen)
Represents a proxy delegate for a managed delegate that is not defined in a parent class.
<Delegate isStatic = "true/false"
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>
ManagedDelegate_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 delegate in the proxy code. The default is false. |
isStatic |
Optional xs:boolean attribute. true to declare the delegate using the static keyword; otherwise, false. 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 the contents of a managed assembly that was passed to ProxyGen.exe. |
Example
The following example demonstrates a Delegate element that represents a proxy delegate named ColorChangedEventHandler.
<Delegate originalFullyQualifiedName="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.ColorChangedEventHandler"
newName="ColorChangedEventHandler"
isExcluded="false"
newNamespace="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp">
<Parameter originalName="sender">
<Type>
<ExternalTypeReference isInterface="false" type="System.Object" />
</Type>
</Parameter>
<Parameter originalName="e">
<Type>
<TypeReference type="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.ColorChangedEventArgs" />
</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 |