SPClaimProvider.GetHierarchy method
Gets the [T:HYPERLINK"ms-help://MS.SPF14SDK.en/SPF14MrefControls/html/a4bf54d0-29e5-e5c2-231e-b1b9f4728a7f.htm"Microsoft.SharePoint.WebControls.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.UriThe context, as a URI. This must be a properly formatted URI.
entityTypes
Type: []The [P:HYPERLINK"mk:@MSITStore:D:\\\\aSDK\\\\SP2010SDK.chm::/html/a4bf54d0-29e5-e5c2-231e-b1b9f4728a7f.htm"Microsoft.SharePoint.WebControls.PickerEntity.EntityType] entity types that are returned on the SPProviderHierarchyTree tree.
hierarchyNodeID
Type: System.StringThe [P:HYPERLINK"ms-help://MS.SPF14SDK.en/SPF14MrefControls/html/a4bf54d0-29e5-e5c2-231e-b1b9f4728a7f.htm"Microsoft.SharePoint.WebControls.SPProviderHierarchyNode.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.Int32The 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. |