Event Element for Class for COMLibrary (ProxyGen)
Represents an event that is defined in a proxy type for a COM type.
<Event dispID = "Dispatch ID of event"
isExternal = "true/false"
isExcluded = "true/false"
newName = "New name of event in proxy type"
originalName = "Name of original event">
<Attribute>...</Attribute>
<DeclaringType>...</DeclaringType>
<Parameter>...</Parameter>
<ReturnValueAttribute>...</ReturnValueAttribute>
<Type>...</Type>
</Event>
COMEvent_Type
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute |
Description |
---|---|
dispId |
Required xs:long attribute. The dispatch ID of the event. |
isExternal |
Optional xs:boolean attribute. true to declare the event using the extern keyword; otherwise, false. The default is false. |
isExcluded |
Optional xs:boolean attribute. true to omit the event from the proxy code; false to include the event in the proxy code. The default is false. |
newName |
Optional name_Type attribute. The new name of the event in the proxy code. |
originalName |
Required name_Type attribute. The name of the original event in the host application's object model. |
Child Elements
Element |
Description |
---|---|
Optional Attribute_Type element. Represents an attribute that is applied to the event. |
|
Optional TypeReference_Type element. Represents the interface or base type in which the event is declared, if the event is an explicit interface implementation or an override. The type cannot be an array. |
|
Optional Parameter_Type element. Represents a parameter of the delegate that handles the event. |
|
Optional Attribute_Type element. Describes an attribute applied to the return value of the delegate that handles the event. |
|
Optional TypeReference_Type element. Describes the type of the delegate that handles the event. The type cannot be an array. |
Parent Elements
Element |
Description |
---|---|
Represents a proxy class for a COM class. |
|
Represents a proxy interface for a COM interface. |
Example
The following example demonstrates three Event elements that represent proxy events named ColorChanged, LocationChanged, and SizeChanged.
<Event originalName="ColorChanged" isExcluded="false" dispId="1">
<Type>
<TypeReference type="ShapeApp.Proxy._IShapeEvents.ColorChanged" />
</Type>
</Event>
<Event originalName="LocationChanged" isExcluded="false" dispId="2">
<Type>
<TypeReference type="ShapeApp.Proxy._IShapeEvents.LocationChanged" />
</Type>
</Event>
<Event originalName="SizeChanged" isExcluded="false" dispId="3">
<Type>
<TypeReference type="ShapeApp.Proxy._IShapeEvents.SizeChanged" />
</Type>
</Event>
Element Information
Namespace |
https://schemas.microsoft.com/vsta/2008/01/ProxyGenDescriptor |
Schema name |
ProxyGen Descriptor |
Validation file |
ProxyGenDescriptorv2.xsd |
Can be empty |
Yes |