SPFarm.GetPersistedFeatureDefinition method (Guid, Int32)
會傳回**[T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition]物件指定的相容性層級根據featureId參數值。如果指定的compatibilityLevel的找不到[T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition]**物件,則會傳回a null reference (Nothing in Visual Basic) 。
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Function GetPersistedFeatureDefinition ( _
featureId As Guid, _
compatibilityLevel As Integer _
) As SPFeatureDefinition
'用途
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
)
參數
featureId
Type: System.Guid識別此功能將Guid物件。
compatibilityLevel
Type: System.Int32整數,代表 (例如,14 或 15) 的功能相容性層級。
傳回值
Type: Microsoft.SharePoint.Administration.SPFeatureDefinition
[T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition] 物件,代表與指定的相容性層級並 GUID 相關聯的物件。