Exemple #1
0
        // override object.Equals
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            Event other = obj as Event;

            if (!Road.Equals(other.Road))
            {
                return(false);
            }
            if (!Location.Equals(other.Location))
            {
                return(false);
            }
            if (!Status.Equals(other.Status))
            {
                return(false);
            }
            if (!TimeToClear.Equals(other.TimeToClear))
            {
                return(false);
            }
            if (!StartClear.Equals(other.StartClear))
            {
                return(false);
            }
            if (!EndClear.Equals(other.EndClear))
            {
                return(false);
            }
            if (!ReturnToNormal.Equals(other.ReturnToNormal))
            {
                return(false);
            }
            if (!StartNormal.Equals(other.StartNormal))
            {
                return(false);
            }
            if (!EndNormal.Equals(other.EndNormal))
            {
                return(false);
            }
            if (!LanesClosed.Equals(other.LanesClosed))
            {
                return(false);
            }
            if (!Reason.Equals(other.Reason))
            {
                return(false);
            }
            if (!Delay.Equals(other.Delay))
            {
                return(false);
            }
            if (DelayedMinutes != other.DelayedMinutes)
            {
                return(false);
            }
            if (!Direction.Equals(other.Direction))
            {
                return(false);
            }
            if (!AreaEffected.Equals(other.AreaEffected))
            {
                return(false);
            }

            return(true);
        }