SPFeatureDefinition.GetFeatureIdAndScope Method

Returns the identifier and scope of the Feature based on a string that specifies the location of its feature.xml file.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.ShimmedTypeOutParam)> _
Public Shared Sub GetFeatureIdAndScope ( _
    pathFeatureDefinition As String, _
    <OutAttribute> ByRef featid As Guid, _
    <OutAttribute> ByRef scope As SPFeatureScope _
)
'Usage
Dim pathFeatureDefinition As String
Dim featid As Guid
Dim scope As SPFeatureScopeSPFeatureDefinition.GetFeatureIdAndScope(pathFeatureDefinition, _
    featid, scope)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.ShimmedTypeOutParam)]
public static void GetFeatureIdAndScope(
    string pathFeatureDefinition,
    out Guid featid,
    out SPFeatureScope scope
)

Parameters

  • pathFeatureDefinition
    Type: System.String

    A string that contains the local path for the Feature in the file system.

  • featid
    Type: System.Guid

    A Guid object that represents the identifier of the Feature.

Remarks

The local path is relative to the root of the directory in which the feature resides.

See Also

Reference

SPFeatureDefinition Class

SPFeatureDefinition Members

Microsoft.SharePoint.Administration Namespace

Other Resources

SharePoint Feature