Adds a handler for events at the domain class level.
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk (in Microsoft.VisualStudio.Modeling.Sdk.dll)
Syntax
'宣言
Public Sub Add ( _
domainClass As DomainClassInfo, _
handler As Delegate _
)
'使用
Dim instance As ElementEventManager
Dim domainClass As DomainClassInfo
Dim handler As Delegate
instance.Add(domainClass, handler)
public void Add(
DomainClassInfo domainClass,
Delegate handler
)
public:
void Add(
DomainClassInfo^ domainClass,
Delegate^ handler
)
public function Add(
domainClass : DomainClassInfo,
handler : Delegate
)
Parameters
domainClass
Type: Microsoft.VisualStudio.Modeling.DomainClassInfoThe domain class or domain relationship for which events are to be handled.
handler
Type: System.DelegateThe event handler.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.