SPSite.QueryFeatures 方法 (SPFeatureScope, Boolean)

Gets a collection of the features deployed in this site collection with either Site or Web scope, including only features that either do or do not need to be upgraded.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Function QueryFeatures ( _
    scope As SPFeatureScope, _
    needsUpgrade As Boolean _
) As SPFeatureQueryResultCollection
用法
Dim instance As SPSite
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
    类型:Microsoft.SharePoint.SPFeatureScope

    An enumeration value that specifies the scope to which the feature applies. The only valid scopes for this method are Site and Web.

  • needsUpgrade
    类型:System.Boolean

    If true, only features that need to be upgraded are included. If false, only features that do not need to be upgraded are included.

返回值

类型:Microsoft.SharePoint.SPFeatureQueryResultCollection
An enumerable collection of SPFeature objects.

另请参阅

引用

SPSite 类

SPSite 成员

QueryFeatures 重载

Microsoft.SharePoint 命名空间