SPWebApplication.QueryFeatures method (Guid, Boolean)
擷取目前的 Web 應用程式中的所有功能的網站或網站範圍設定,且具有指定的功能識別碼及升級的需求。
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Function QueryFeatures ( _
featureId As Guid, _
needsUpgrade As Boolean _
) As SPFeatureQueryResultCollection
'用途
Dim instance As SPWebApplication
Dim featureId As Guid
Dim needsUpgrade As Boolean
Dim returnValue As SPFeatureQueryResultCollection
returnValue = instance.QueryFeatures(featureId, _
needsUpgrade)
public SPFeatureQueryResultCollection QueryFeatures(
Guid featureId,
bool needsUpgrade
)
參數
featureId
Type: System.Guid要擷取之功能的識別碼。
needsUpgrade
Type: System.Booleantrue表示只需要升級的功能是包含 ;否則, false表示不需要升級的功能也會包含在內。
傳回值
Type: Microsoft.SharePoint.SPFeatureQueryResultCollection
會傳回SPFeatureQueryResultCollection物件,代表指定的範圍、 識別碼及升級需求的所有功能。