SPEventReceiverDefinitionCollection.Add method (SPEventReceiverType, String, String)
Adds an event receiver definition to the collection that is already associated with its Assembly name, Class name, and event receiver type.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
'Declaration
Public Sub Add ( _
receiverType As SPEventReceiverType, _
assembly As String, _
className As String _
)
'Usage
Dim instance As SPEventReceiverDefinitionCollection
Dim receiverType As SPEventReceiverType
Dim assembly As String
Dim className As String
instance.Add(receiverType, assembly, className)
public void Add(
SPEventReceiverType receiverType,
string assembly,
string className
)
receiverType
Type: Microsoft.SharePoint.SPEventReceiverTypeAn SPEventReceiverType value that specifies the type of event receiver.
assembly
Type: System.StringA string that contains the name of the assembly.
className
Type: System.StringA string that contains the name of the class.
This overload of the Add method adds the new object to the in-memory collection of event receiver definitions, in addition to adding the item to the backing store when the Update method is called on the item.
SPEventReceiverDefinitionCollection class
SPEventReceiverDefinitionCollection members