Example #1
0
        public int CompareTo(IDelayInfoBase other)
        {
            if (Equals(other))
            {
                return(0);
            }

            if (Date == other.Date && PlannedArrival != null)
            {
                return(PlannedArrival.Value.CompareTo(other.PlannedArrival));
            }
            else if (Date == other.Date && PlannedDeparture != null)
            {
                return(PlannedDeparture.Value.CompareTo(other.PlannedDeparture));
            }
            else
            {
                return(Date.CompareTo(other.Date));
            }
        }
Example #2
0
 public bool Equals(IDelayInfoBase other)
 {
     return(Train == other.Train && Date == other.Date &&
            From == other.From && Destination == other.Destination);
 }