SPEventReceiverDefinition.ParentHostId Property
Gets or sets the ID of the parent object of the object that hosts the event.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online