SiteMapNode.GetAllNodes 메서드

정의

분리 정도에 상관없이 호출하는 노드의 하위 항목인 모든 SiteMapNode 개체의 읽기 전용 컬렉션을 검색합니다.

public:
 System::Web::SiteMapNodeCollection ^ GetAllNodes();
public System.Web.SiteMapNodeCollection GetAllNodes ();
member this.GetAllNodes : unit -> System.Web.SiteMapNodeCollection
Public Function GetAllNodes () As SiteMapNodeCollection

반환

SiteMapNodeCollection

현재 공급자 범위 내에서 SiteMapNodeCollection의 모든 하위 항목을 나타내는 읽기 전용 SiteMapNode입니다.

예제

다음 코드 예제에서는의 모든 자식 노드를 검색 하는 방법에 설명 합니다 RootNode 사용 하 여는 GetAllNodes 메서드.

SiteMapNodeCollection siteNodes = SiteMap.RootNode.GetAllNodes();

if ( siteNodes.IsReadOnly ||
     siteNodes.IsFixedSize )
{
    Response.Write("Collection is read-only or has fixed size.<BR>");

    // Create a new, modifiable collection from the existing one.
    SiteMapNodeCollection modifiableCollection =
         new SiteMapNodeCollection(siteNodes);

    // The MoveNode example method moves a node from position one to
    // the last position in the collection.
    MoveNode(modifiableCollection);
}
else {
    MoveNode(siteNodes);
}

Dim siteNodes As SiteMapNodeCollection
siteNodes = SiteMap.RootNode.GetAllNodes()

If siteNodes.IsReadOnly Or siteNodes.IsFixedSize Then

    Response.Write("Collection is read-only or has fixed size.<BR>")

    ' Create a new, modifiable collection from the existing one.
    Dim modifiableCollection As SiteMapNodeCollection
    modifiableCollection = New SiteMapNodeCollection(siteNodes)

    ' The MoveNode example method moves a node from position one to
    ' the last position in the collection.
    MoveNode(modifiableCollection)
Else
    MoveNode(siteNodes)
End If

설명

이 메서드는 직계 자식 노드 및 모든 해당 자식 노드를 재귀적으로 검색합니다.

적용 대상

추가 정보