Beispiel #1
0
        /// <summary>
        ///     Returns true if Checkpoint instances are equal
        /// </summary>
        /// <param name="other">Instance of Checkpoint to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Checkpoint other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Number == other.Number ||
                     Number.Equals(other.Number)
                     ) &&
                 (
                     CheckedBy == other.CheckedBy ||
                     CheckedBy != null &&
                     other.CheckedBy != null &&
                     CheckedBy.SequenceEqual(other.CheckedBy)
                 ) &&
                 (
                     Direction == other.Direction ||
                     Direction.Equals(other.Direction)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Id == other.Id ||
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Location == other.Location ||
                     Location != null &&
                     Location.Equals(other.Location)
                 ));
        }