SPFarm.GetPersistedFeatureDefinition method (Guid, Int32)
Returns the [T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition] object for the given compatibility level based on the featureId parameter value. If the [T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition] object is not found for the specified compatibilityLevel, a null reference (Nothing in Visual Basic) is returned.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function GetPersistedFeatureDefinition ( _
featureId As Guid, _
compatibilityLevel As Integer _
) As SPFeatureDefinition
'Usage
Dim instance As SPFarm
Dim featureId As Guid
Dim compatibilityLevel As Integer
Dim returnValue As SPFeatureDefinition
returnValue = instance.GetPersistedFeatureDefinition(featureId, _
compatibilityLevel)
public SPFeatureDefinition GetPersistedFeatureDefinition(
Guid featureId,
int compatibilityLevel
)
Parameters
featureId
Type: System.GuidA Guid object that identifies the feature.
compatibilityLevel
Type: System.Int32An integer that represents the feature compatibility level (for example, 14 or 15).
Return value
Type: Microsoft.SharePoint.Administration.SPFeatureDefinition
An [T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition] object that represents the object that is associated with the GUID and the given compatibility level.