다음을 통해 공유


SPFeatureDefinitionCollection class

Represents a collection of SPFeatureDefinition objects.

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPFeatureDefinition>
    Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPFeatureDefinition>
      Microsoft.SharePoint.Administration.SPFeatureDefinitionCollection

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

Syntax

'Declaration
<GuidAttribute("E8FDC5F0-9083-457f-AF33-5FB236AAB658")> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPFeatureDefinitionCollection _
    Inherits SPPersistedChildCollection(Of SPFeatureDefinition)
'Usage
Dim instance As SPFeatureDefinitionCollection
[GuidAttribute("E8FDC5F0-9083-457f-AF33-5FB236AAB658")]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPFeatureDefinitionCollection : SPPersistedChildCollection<SPFeatureDefinition>

Remarks

Use the FeatureDefinitions property of the SPFarm class to get the collection of Feature definitions installed in the server farm.

Use the FeatureDefinitions property of the SPSite class to get the collection of Feature definitions installed in the site collection.

To add a Feature definition to the collection, use one of the Add methods of the SPFeatureDefinitionCollection class.

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

SPFeatureDefinitionCollection members

Microsoft.SharePoint.Administration namespace