Map Provider. Hint Neighborhood Nodes(SiteMapNode, 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 a method that site map providers can override to perform an optimized retrieval of nodes found in the proximity of the specified node.
public: virtual void HintNeighborhoodNodes(System::Web::SiteMapNode ^ node, int upLevel, int downLevel);
public virtual void HintNeighborhoodNodes (System.Web.SiteMapNode node, int upLevel, int downLevel);
abstract member HintNeighborhoodNodes : System.Web.SiteMapNode * int * int -> unit override this.HintNeighborhoodNodes : System.Web.SiteMapNode * int * int -> unit
Public Overridable Sub HintNeighborhoodNodes (node As SiteMapNode, upLevel As Integer, downLevel As Integer)
The number of ancestor SiteMapNode generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors (and their descendant nodes to the level of
node) might be retrieved and cached.
The number of descendant SiteMapNode generations to fetch. 0 indicates no descendant nodes are retrieved and -1 indicates that all descendant nodes might be retrieved and cached.
downLevel is less than -1.
The default HintNeighborhoodNodes method only checks for an
downLevel parameters that are less than -1 and a
node parameter that is
null. Because the XmlSiteMapProvider object caches site map information in memory, the HintNeighborhoodNodes method is not used.
Site map providers can override the HintNeighborhoodNodes method to perform an optimized lookup of the SiteMapNode objects in the proximity of the specified SiteMapNode. The
upLevel parameter is used to specify how many levels of parent and ancestor nodes to traverse from the specified SiteMapNode. The
downLevel parameter is used to specify how many levels of child nodes from the current node to retrieve. If preferred, the ancestor and descendant nodes can be linked to the SiteMapNode that is returned by the HintNeighborhoodNodes method, using the ParentNode and ChildNodes properties.