Share via


PortalSiteMapProvider.TryGetRootNode property

Gets the root node only if it is cached.

Namespace:  Microsoft.SharePoint.Publishing.Navigation
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
Public ReadOnly Property TryGetRootNode As PortalSiteMapNode
    Get
'Usage
Dim instance As PortalSiteMapProvider
Dim value As PortalSiteMapNode

value = instance.TryGetRootNode
public PortalSiteMapNode TryGetRootNode { get; }

Property value

Type: Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode
A reference to the root PortalSiteMapNode portal. Returns a null reference (Nothing in Visual Basic) if the root Web site is not cached.

Remarks

Use this property for Search and other functions and Features that can use a cached value if one exists, but when you do not want to create more workload by loading the cached value onto sites that are not portal sites.

See also

Reference

PortalSiteMapProvider class

PortalSiteMapProvider members

Microsoft.SharePoint.Publishing.Navigation namespace

PortalSiteMapProvider