protected internal virtual int CompareNodes(HierarchyNode node1, HierarchyNode node2)
{
Debug.Assert(node1 != null && node2 != null);
if (node1 == null)
{
throw new ArgumentNullException("node1");
}
if (node2 == null)
{
throw new ArgumentNullException("node2");
}
if (node1.SortPriority == node2.SortPriority)
{
return String.Compare(node2.Caption, node1.Caption, true, CultureInfo.CurrentCulture);
}
else
{
return node2.SortPriority - node1.SortPriority;
}
}