Поделиться через


SPFeatureReceiver Class

Base abstract class that can be overridden to trap the activation, deactivation, installation, or uninstallation of a Feature.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.SPFeatureReceiver
    Microsoft.SharePoint.SPWikiWelcomeFeatureReceiver

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

Syntax

<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public MustInherit Class SPFeatureReceiver

Dim instance As SPFeatureReceiver
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public abstract class SPFeatureReceiver

Remarks

Use the SPFeatureReceiver class to trap events that are raised after the Feature installation, uninstallation, activation, or deactivation action has been performed.

It is not possible to cancel an installation or uninstallation through Feature events.

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.

See Also

Reference

SPFeatureReceiver Members

Microsoft.SharePoint Namespace