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