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)
Available in Sandboxed Solutions: No

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