Adds a handler for events at the domain model level.
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk (in Microsoft.VisualStudio.Modeling.Sdk.dll)
Syntax
'宣言
Public Sub Add ( _
domainModel As DomainModelInfo, _
handler As Delegate _
)
'使用
Dim instance As ElementEventManager
Dim domainModel As DomainModelInfo
Dim handler As Delegate
instance.Add(domainModel, handler)
public void Add(
DomainModelInfo domainModel,
Delegate handler
)
public:
void Add(
DomainModelInfo^ domainModel,
Delegate^ handler
)
public function Add(
domainModel : DomainModelInfo,
handler : Delegate
)
Parameters
domainModel
Type: Microsoft.VisualStudio.Modeling.DomainModelInfoThe domain model 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.