Example #1
0
        public int CompareTo(TabEditorOriginalElementState other)
        {
            if (ReferenceEquals(this, other))
            {
                return(0);
            }
            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var uniqueIdComparison = UniqueID.CompareTo(other.UniqueID);

            if (uniqueIdComparison != 0)
            {
                return(uniqueIdComparison);
            }
            var pageIndexComparison = PageIndex.CompareTo(other.PageIndex);

            if (pageIndexComparison != 0)
            {
                return(pageIndexComparison);
            }
            return(string.Compare(LabelText, other.LabelText, StringComparison.Ordinal));
        }