Sort key for the empty sequence. Empty sequence always compares sorts either before all other values, or after all other values.
Inheritance: XmlSortKey
コード例 #1
0
ファイル: XmlSortKey.cs プロジェクト: z77ma/runtime
        protected int CompareToEmpty(object obj)
        {
            XmlEmptySortKey that = obj as XmlEmptySortKey;

            Debug.Assert(that != null && !(this is XmlEmptySortKey));
            return(that.IsEmptyGreatest ? -1 : 1);
        }
コード例 #2
0
ファイル: XmlSortKey.cs プロジェクト: z77ma/runtime
        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));
        }