SPContentTypeUsage class
Used to track where a content type is used as the basis for another content type.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
An SPContentTypeUsage object contains information about a single instance where a content type is used as the basis for another content type. For example, when a site content type is applied to a list, a child of the site content type is created and added to the list’s content type collection. The new list content type is an instance where the parent site content type is “used.” An SPContentTypeUsage object can provide information about this use, such as the Uniform Resource Locator (URL) for the root folder of a list that has a derived content type.
Note |
|---|
A content type is “used” if any content type derived from it is present in an SPContentTypeCollection collection at the site or list level anywhere within the scope of the parent content type. |
To get a list of all uses of a content type throughout a site collection, call the static GetUsages(SPContentType) method, which returns a generic list of SPContentTypeUsage objects.
Note