共用方式為


SPClaimProvider.GetHierarchy Method

Gets the SPProviderHierarchyTree hierarchy that is rooted at a particular hierarchyNodeID.

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

Syntax

'Declaration
Public Function GetHierarchy ( _
    context As Uri, _
    entityTypes As String(), _
    hierarchyNodeID As String, _
    numberOfLevels As Integer _
) As SPProviderHierarchyTree
'Usage
Dim instance As SPClaimProvider
Dim context As Uri
Dim entityTypes As String()
Dim hierarchyNodeID As String
Dim numberOfLevels As Integer
Dim returnValue As SPProviderHierarchyTree

returnValue = instance.GetHierarchy(context, _
    entityTypes, hierarchyNodeID, numberOfLevels)
public SPProviderHierarchyTree GetHierarchy(
    Uri context,
    string[] entityTypes,
    string hierarchyNodeID,
    int numberOfLevels
)

Parameters

  • context
    Type: System.Uri

    The context, as a URI. This must be a properly formatted URI.

  • hierarchyNodeID
    Type: System.String

    The HierarchyNodeID() of the node to root the result set at. If a null reference (Nothing in Visual Basic) then the root is returned.

  • numberOfLevels
    Type: System.Int32

    The number of levels of hierarchy to return.

Return Value

Type: Microsoft.SharePoint.WebControls.SPProviderHierarchyTree
A SPProviderHierarchyTree tree for the claims provider with a maximum height specified in the numberOfLevels parameter.

Exceptions

Exception Condition
ArgumentNullException

Thrown when context is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

Thrown when numberOfLevels is less than 1.

NotImplementedException

Thrown when SupportsHierachy() is false.

See Also

Reference

SPClaimProvider Class

SPClaimProvider Members

Microsoft.SharePoint.Administration.Claims Namespace