Sort key for the empty sequence. Empty sequence always compares sorts either before all other values, or after all other values.
Inheritance: XmlSortKey
Exemple #1
0
        protected int CompareToEmpty(object obj)
        {
            XmlEmptySortKey that = obj as XmlEmptySortKey;

            Debug.Assert(that != null && !(this is XmlEmptySortKey));
            return(that.IsEmptyGreatest ? -1 : 1);
        }
Exemple #2
0
        public override int CompareTo(object obj)
        {
            XmlEmptySortKey that = obj as XmlEmptySortKey;

            if (that == null)
            {
                // Empty compared to non-empty
                Debug.Assert(obj is XmlSortKey);
                return(-(obj as XmlSortKey).CompareTo(this));
            }

            // Empty compared to empty
            return(BreakSortingTie(that));
        }