SiteMapProvider.RootNode 속성

정의

현재 공급자가 나타내는 사이트 맵 데이터의 루트 SiteMapNode 개체를 가져옵니다.

public:
 virtual property System::Web::SiteMapNode ^ RootNode { System::Web::SiteMapNode ^ get(); };
public virtual System.Web.SiteMapNode RootNode { get; }
member this.RootNode : System.Web.SiteMapNode
Public Overridable ReadOnly Property RootNode As SiteMapNode

속성 값

SiteMapNode

현재 사이트 맵 데이터 공급자의 루트 SiteMapNode입니다. 기본적으로 구현하면 반환된 노드에 대해 보안 트리밍이 수행됩니다.

예제

다음 코드 예제를 구현 하는 방법에 설명 합니다 RootNode 를 구현 하는 클래스의 속성에서에서 SiteMapProvider 클래스입니다.

이 코드 예제는에 대해 제공 된 큰 예제의 일부는 SiteMapProvider 클래스입니다.

// Implement the CurrentNode property.
public override SiteMapNode CurrentNode
{
  get
  {
    string currentUrl = FindCurrentUrl();
    // Find the SiteMapNode that represents the current page.
    SiteMapNode currentNode = FindSiteMapNode(currentUrl);
    return currentNode;
  }
}

// Implement the RootNode property.
public override SiteMapNode RootNode
{
  get
  {
    return rootNode;
  }
}
' Implement the CurrentNode property.
Public Overrides ReadOnly Property CurrentNode() As SiteMapNode
  Get
    Dim currentUrl As String = FindCurrentUrl()
    ' Find the SiteMapNode that represents the current page.
    Dim aCurrentNode As SiteMapNode = FindSiteMapNode(currentUrl)
    Return aCurrentNode
  End Get
End Property

' Implement the RootNode property.
Public Overrides ReadOnly Property RootNode() As SiteMapNode
  Get
    Return aRootNode
  End Get
End Property

설명

기본 구현 호출 추상 GetRootNodeCore 메서드.

상속자 참고

재정의 하는 경우는 RootNode 파생된 클래스에서 속성 구현이 공급자 계층 구조를 탐색 하지 않고 사이트의 절대 루트 노드를 찾고 있는 경우 해야 합니다.

적용 대상

추가 정보