Share via


NavigationComparer Class

Implements the generic IComparer interface that can sort PortalSiteMapNode objects for a given locale by title or date, and by ascending or descending order.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Publishing.Navigation.NavigationComparer

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

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public Class NavigationComparer _
    Implements IComparer(Of PortalSiteMapNode)
'Usage
Dim instance As NavigationComparer
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class NavigationComparer : IComparer<PortalSiteMapNode>

Remarks

Using this class through the IComparer interface might not result in the same sort order as the sort order that results from using the SortNavigationNodes method. The SortNavigationNodes method is used to sort child collections when necessary.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

NavigationComparer Members

Microsoft.SharePoint.Publishing.Navigation Namespace