public int CompareTo(object obj)
        {
            if (!(obj is ScheduleEntity o))
            {
                return(1);
            }

            return(Begin?.CompareTo(o.Begin) ?? -1);
        }
Exemplo n.º 2
0
        public int CompareTo(PhylopInterval otherInterval)
        {
            // A null value means that this object is greater.
            if (otherInterval == null)
            {
                return(1);
            }

            return(Begin.CompareTo(otherInterval.Begin));
        }
Exemplo n.º 3
0
        public Int32 CompareTo(T other)
        {
            if (End.CompareTo(other) < 0)
            {
                return(-1);
            }

            if (Begin.CompareTo(other) > 0)
            {
                return(+1);
            }

            return(0);
        }
Exemplo n.º 4
0
        public int CompareTo(IPAddressRange other)
        {
            // compare begin addresses first
            int compare = Begin.CompareTo(other.Begin);

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

            // begin address are equal, compare end addresses
            compare = End.CompareTo(other.End);
            if (compare != 0)
            {
                return(compare);
            }

            return(0); // equal
        }
Exemplo n.º 5
0
        public Int32 CompareTo(Range <T> other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            if (End.CompareTo(other.Begin) < 0)
            {
                // does not overlap and less then other
                return(-1);
            }

            if (Begin.CompareTo(other.End) > 0)
            {
                // does not overlap and greater then other
                return(+1);
            }

            // does overlap
            return(0);
        }
Exemplo n.º 6
0
 public int CompareTo(TimePeriod other) => Begin.CompareTo(other.Begin);
Exemplo n.º 7
0
 public int CompareTo(Content other) => Begin.CompareTo(other.Begin);
Exemplo n.º 8
0
 public int CompareTo(AnimationTransition <T> other)
 {
     return(Begin.CompareTo(other.Begin));
 }