Ejemplo n.º 1
0
        public virtual bool sameEventAs(HandlingEvent other)
        {
            var equal = other != null &&
                        Cargo.Equals(other.Cargo) &&
                        CompletionTime.Equals(other.CompletionTime) &&
                        Activity.Equals(other.Activity);

            return(equal);
        }
        /// <summary>
        /// Returns true if Route instances are equal
        /// </summary>
        /// <param name="input">Instance of Route to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Route input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     VehicleId == input.VehicleId ||
                     (VehicleId != null &&
                      VehicleId.Equals(input.VehicleId))
                     ) &&
                 (
                     Distance == input.Distance ||
                     (Distance != null &&
                      Distance.Equals(input.Distance))
                 ) &&
                 (
                     TransportTime == input.TransportTime ||
                     (TransportTime != null &&
                      TransportTime.Equals(input.TransportTime))
                 ) &&
                 (
                     CompletionTime == input.CompletionTime ||
                     (CompletionTime != null &&
                      CompletionTime.Equals(input.CompletionTime))
                 ) &&
                 (
                     WaitingTime == input.WaitingTime ||
                     (WaitingTime != null &&
                      WaitingTime.Equals(input.WaitingTime))
                 ) &&
                 (
                     Activities == input.Activities ||
                     Activities != null &&
                     Activities.SequenceEqual(input.Activities)
                 ) &&
                 (
                     Points == input.Points ||
                     Points != null &&
                     Points.SequenceEqual(input.Points)
                 ));
        }