SiteMapProvider.HintAncestorNodes(SiteMapNode, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a method that site map providers can override to perform an optimized retrieval of one or more levels of parent and ancestor nodes, relative to the specified SiteMapNode object.
public:
virtual void HintAncestorNodes(System::Web::SiteMapNode ^ node, int upLevel);
public virtual void HintAncestorNodes (System.Web.SiteMapNode node, int upLevel);
abstract member HintAncestorNodes : System.Web.SiteMapNode * int -> unit
override this.HintAncestorNodes : System.Web.SiteMapNode * int -> unit
Public Overridable Sub HintAncestorNodes (node As SiteMapNode, upLevel As Integer)
Parameters
- node
- SiteMapNode
The SiteMapNode that acts as a reference point for upLevel
.
- upLevel
- Int32
The number of ancestor SiteMapNode generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors might be retrieved and cached.
Exceptions
upLevel
is less than -1.
node
is null
.
Remarks
The default HintAncestorNodes method only checks for an upLevel
parameter that is less than -1 and a node
parameter that is null
. Because the XmlSiteMapProvider class caches site map information in memory, the HintAncestorNodes method is not used.
Site map providers can override the HintAncestorNodes method to perform an optimized retrieval of parent and ancestor nodes of the specified SiteMapNode object.
The upLevel
parameter is used to specify how many levels of parent and ancestor nodes to traverse from the specified SiteMapNode. If fewer levels exist than are requested, all available ancestor nodes are returned within the specified bound. If preferred, the parent node can be linked to the specified SiteMapNode using the ParentNode property.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기