Map Provider. Get Current Node And Hint Neighborhood Nodes(Int32, Int32) Method
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 an optimized lookup method for site map providers when retrieving the node for the currently requested page and fetching the site map nodes in the proximity of the current node.
public: virtual System::Web::SiteMapNode ^ GetCurrentNodeAndHintNeighborhoodNodes(int upLevel, int downLevel);
public virtual System.Web.SiteMapNode GetCurrentNodeAndHintNeighborhoodNodes (int upLevel, int downLevel);
abstract member GetCurrentNodeAndHintNeighborhoodNodes : int * int -> System.Web.SiteMapNode override this.GetCurrentNodeAndHintNeighborhoodNodes : int * int -> System.Web.SiteMapNode
Public Overridable Function GetCurrentNodeAndHintNeighborhoodNodes (upLevel As Integer, downLevel As Integer) As SiteMapNode
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 by the provider.
The number of child SiteMapNode generations to fetch. 0 indicates no descendant nodes are retrieved and a -1 indicates that all descendant nodes might be retrieved and cached by the provider.
downLevel is less than -1.
The default implementation of the GetCurrentNodeAndHintNeighborhoodNodes method returns the CurrentNode property; however, site map providers can override the GetCurrentNodeAndHintNeighborhoodNodes method and provide an optimized implementation that uses custom caching mechanisms to return the current SiteMapNode object, as well as SiteMapNode objects that are in the proximity of the current SiteMapNode.
upLevel parameter is used to specify how many levels of parent and ancestor nodes to retrieve and cache, along with their immediate children. The
downLevel parameter is used to specify how many levels of descendant nodes from the current SiteMapNode to retrieve. If preferred, the ancestor and descendant nodes can be linked to the SiteMapNode that is returned by the
GetCurrentNodeAndHintNeighborhoodNodes method, using the ParentNode and ChildNodes properties. If there are fewer ancestor or child node levels than are specified by
downLevel, only those that are available are retrieved.
The XmlSiteMapProvider class, which is the default site map provider for ASP.NET, caches the entire site map in memory, which results in little or no overhead when querying the XmlSiteMapProvider for specific SiteMapNode objects.