IPolicyFeature.UnRegister(SPContentType) IPolicyFeature.UnRegister(SPContentType) IPolicyFeature.UnRegister(SPContentType) Method

Definition

Performs any needed cleanup work when a policy item is removed from a policy.

public:
 void UnRegister(Microsoft::SharePoint::SPContentType ^ ct);
public void UnRegister (Microsoft.SharePoint.SPContentType ct);
Public Sub UnRegister (ct As SPContentType)
Parameters
ct
SPContentType SPContentType SPContentType

Content type to which the policy applies.

Remarks

SharePoint Server 2010 calls the UnRegister(SPContentType) method when an existing policy item is removed from a policy. If you delete a policy item from a policy, SharePoint Server 2010 calls the UnRegister(SPContentType) method of the associated policy feature to perform any needed cleanup work. You use this method to undo anything you did when you called the Register(SPContentType) method that no longer applies.

For more information, see IPolicyFeature Interface Overview and Policy Feature Definitions.

For an example of how to use this method, see the example in the ProcessListItem(SPSite, PolicyItem, SPListItem) method.

Applies to