Share via


SPWebApplication.QueryFeatures method (Guid, Boolean)

Retrieves all features in the current Web application that are scoped to Site or Web and have the specified feature identifier and requirement for upgrade.

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 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
)

Parameters

  • featureId
    Type: System.Guid

    Identifier of the features to be retrieved.

  • needsUpgrade
    Type: System.Boolean

    true indicates that only the features that require upgrade are included; otherwise, false indicates that features that do not require upgrade are also included.

Return value

Type: Microsoft.SharePoint.SPFeatureQueryResultCollection
Returns an SPFeatureQueryResultCollection object that represents all features of a given scope, identifier, and requirement for upgrade.

See also

Reference

SPWebApplication class

SPWebApplication members

QueryFeatures overload

Microsoft.SharePoint.Administration namespace