IPolicyFeature.Register(SPContentType) IPolicyFeature.Register(SPContentType) IPolicyFeature.Register(SPContentType) Method

Definition

Performs any required initiation work, such as adding specific columns to the content type, or registering for events when a policy item is added to a policy.

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

Content type to which the policy applies.

Remarks

Microsoft SharePoint Server 2010 calls the Register(SPContentType) method when a user adds a new policy item to a policy. SharePoint Server 2010 calls the Register(SPContentType) method of the associated policy feature to perform any required initiation work. 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