예제 #1
0
        /// <inheritdoc />
        public int CompareTo(OverlapAnnotation other)
        {
            if (ReferenceEquals(this, other))
            {
                return(0);
            }
            if (other is null)
            {
                return(1);
            }
            var whereComparison = Where.CompareTo(other.Where);

            if (whereComparison != 0)
            {
                return(whereComparison);
            }

            var whatComparison = What.CompareTo(other.What);

            if (whatComparison != 0)
            {
                return(whatComparison);
            }

            var whoComparison = Who.CompareTo(other.Who);

            return(whoComparison != 0 ? whoComparison : Why.CompareTo(other.Why));
        }