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 나타내는 읽기 전용 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

설명

이 메서드는 직함 자식 노드와 모든 자식 노드를 재귀적으로 검색합니다.

적용 대상

추가 정보