System.Xml.Xsl.Runtime.XmlSortKey.BreakSortingTie C# (CSharp) Method

BreakSortingTie() protected method

When two keys are compared and found to be equal, the tie must be broken. If there is a secondary key, then use that to break the tie. Otherwise, use the input ordering to break the tie. Since every key has a unique index, this is guaranteed to always break the tie.
protected BreakSortingTie ( XmlSortKey that ) : int
that XmlSortKey
return int
        protected int BreakSortingTie(XmlSortKey that)
        {
            if (_nextKey != null)
            {
                // There are multiple keys, so break tie using next key
                Debug.Assert(_nextKey != null && that._nextKey != null);
                return _nextKey.CompareTo(that._nextKey);
            }

            Debug.Assert(_priority != that._priority);
            return (_priority < that._priority) ? -1 : 1;
        }