共用方式為


SPEventReceiverDefinitionCollection class

表示用來列舉已註冊的事件接收器的Microsoft SharePoint Foundation物件可以有事件的清單的SPEventReceiverDefinition物件的集合。

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.SPEventReceiverDefinitionCollection

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Class SPEventReceiverDefinitionCollection _
    Inherits SPBaseCollection
'用途
Dim instance As SPEventReceiverDefinitionCollection
public class SPEventReceiverDefinitionCollection : SPBaseCollection

備註

使用SPContentTypeSPFileSPListSPListItemSPWebSPWorkflow類別的EventReceivers屬性來取得SharePoint Foundation物件的已註冊的事件接收器的集合。

若要建立事件接收器定義,請使用其中一個SPEventReceiverDefinitionCollection類別的Add方法。

若要從集合傳回單一事件接收器定義中使用索引子。例如,假設集合指派給名為 myEventReceiverDefinitions 的變數時,使用在 C# 的myEventReceiverDefinitions[index]或myEventReceiverDefinitions(index)在 Visual Basic.NET 中,其中index是集合中定義的索引編號,或是定義的 GUID。

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

請參閱

參照

SPEventReceiverDefinitionCollection members

Microsoft.SharePoint namespace

HostId