SPContentDatabase.QueryFeatures method (Guid, Boolean)

Gets all site- or Web-scoped features in this content database that have a specific feature ID and that need to be upgraded, or all that do not, as specified.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function QueryFeatures ( _
    featureId As Guid, _
    needsUpgrade As Boolean _
) As SPFeatureQueryResultCollection
'Usage
Dim instance As SPContentDatabase
Dim featureId As Guid
Dim needsUpgrade As Boolean
Dim returnValue As SPFeatureQueryResultCollection

returnValue = instance.QueryFeatures(featureId, _
    needsUpgrade)
public SPFeatureQueryResultCollection QueryFeatures(
    Guid featureId,
    bool needsUpgrade
)

Parameters

  • featureId
    Type: System.Guid

    The ID of the features to be returned.

  • needsUpgrade
    Type: System.Boolean

    true to include only the features that need to be upgraded; false to include only those that do not need to be upgraded.

Return value

Type: Microsoft.SharePoint.SPFeatureQueryResultCollection
The site- or Web-scoped features that have the specified ID as filtered by needsUpgrade.

See also

Reference

SPContentDatabase class

SPContentDatabase members

QueryFeatures overload

Microsoft.SharePoint.Administration namespace