public int CompareTo(DataNode otherNode) { String thisName = m_Value.getName(); String otherName = otherNode.m_Value.getName(); if (thisName == otherName) { return(0); } if (thisName.Length > 0 && thisName[0] == '_') { thisName = thisName.Substring(1); } if (otherName.Length > 0 && otherName[0] == '_') { otherName = otherName.Substring(1); } int result = LogicalComparer.Compare(thisName, otherName); if (result != 0) { return(result); } return(m_Value.getName().Length > 0 && m_Value.getName()[0] == '_' ? 1 : -1); }
public int CompareTo(VariableNode otherNode) { string thisName = Text; string otherName = otherNode.Text; if (thisName == otherName) { return(0); } if (thisName.Length > 0 && thisName[0] == '_') { thisName = thisName.Substring(1); } if (otherName.Length > 0 && otherName[0] == '_') { otherName = otherName.Substring(1); } int result = LogicalComparer.Compare(thisName, otherName); if (result != 0) { return(result); } return(m_Variable.getName().length() > 0 && m_Variable.getName().startsWith("_") ? 1 : -1); }
public int CompareTo(DataNode otherNode) { String thisName = Text; String otherName = otherNode.Text; if (thisName == otherName) { return(0); } if (thisName.Length > 0 && thisName[0] == '_') { thisName = thisName.Substring(1); } if (otherName.Length > 0 && otherName[0] == '_') { otherName = otherName.Substring(1); } int result = LogicalComparer.Compare(thisName, otherName); if (result != 0) { return(result); } return(m_Value.Name.Length > 0 && m_Value.Name.StartsWith("_") ? 1 : -1); }