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

            return
                ((
                     Id == input.Id ||
                     (Id != null &&
                      Id.Equals(input.Id))
                     ) &&
                 (
                     Name == input.Name ||
                     (Name != null &&
                      Name.Equals(input.Name))
                 ) &&
                 (
                     Priority == input.Priority ||
                     (Priority != null &&
                      Priority.Equals(input.Priority))
                 ) &&
                 (
                     Pickup == input.Pickup ||
                     (Pickup != null &&
                      Pickup.Equals(input.Pickup))
                 ) &&
                 (
                     Delivery == input.Delivery ||
                     (Delivery != null &&
                      Delivery.Equals(input.Delivery))
                 ) &&
                 (
                     Size == input.Size ||
                     Size != null &&
                     Size.SequenceEqual(input.Size)
                 ) &&
                 (
                     RequiredSkills == input.RequiredSkills ||
                     RequiredSkills != null &&
                     RequiredSkills.SequenceEqual(input.RequiredSkills)
                 ) &&
                 (
                     AllowedVehicles == input.AllowedVehicles ||
                     AllowedVehicles != null &&
                     AllowedVehicles.SequenceEqual(input.AllowedVehicles)
                 ) &&
                 (
                     DisallowedVehicles == input.DisallowedVehicles ||
                     DisallowedVehicles != null &&
                     DisallowedVehicles.SequenceEqual(input.DisallowedVehicles)
                 ) &&
                 (
                     MaxTimeInVehicle == input.MaxTimeInVehicle ||
                     (MaxTimeInVehicle != null &&
                      MaxTimeInVehicle.Equals(input.MaxTimeInVehicle))
                 ));
        }
Example #2
0
        /// <summary>
        /// Returns true if Service instances are equal
        /// </summary>
        /// <param name="input">Instance of Service to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Service input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Id == input.Id ||
                     (Id != null &&
                      Id.Equals(input.Id))
                     ) &&
                 (
                     Type == input.Type ||
                     (Type != null &&
                      Type.Equals(input.Type))
                 ) &&
                 (
                     Priority == input.Priority ||
                     (Priority != null &&
                      Priority.Equals(input.Priority))
                 ) &&
                 (
                     Name == input.Name ||
                     (Name != null &&
                      Name.Equals(input.Name))
                 ) &&
                 (
                     Address == input.Address ||
                     (Address != null &&
                      Address.Equals(input.Address))
                 ) &&
                 (
                     Duration == input.Duration ||
                     (Duration != null &&
                      Duration.Equals(input.Duration))
                 ) &&
                 (
                     PreparationTime == input.PreparationTime ||
                     (PreparationTime != null &&
                      PreparationTime.Equals(input.PreparationTime))
                 ) &&
                 (
                     TimeWindows == input.TimeWindows ||
                     TimeWindows != null &&
                     TimeWindows.SequenceEqual(input.TimeWindows)
                 ) &&
                 (
                     Size == input.Size ||
                     Size != null &&
                     Size.SequenceEqual(input.Size)
                 ) &&
                 (
                     RequiredSkills == input.RequiredSkills ||
                     RequiredSkills != null &&
                     RequiredSkills.SequenceEqual(input.RequiredSkills)
                 ) &&
                 (
                     AllowedVehicles == input.AllowedVehicles ||
                     AllowedVehicles != null &&
                     AllowedVehicles.SequenceEqual(input.AllowedVehicles)
                 ) &&
                 (
                     DisallowedVehicles == input.DisallowedVehicles ||
                     DisallowedVehicles != null &&
                     DisallowedVehicles.SequenceEqual(input.DisallowedVehicles)
                 ) &&
                 (
                     MaxTimeInVehicle == input.MaxTimeInVehicle ||
                     (MaxTimeInVehicle != null &&
                      MaxTimeInVehicle.Equals(input.MaxTimeInVehicle))
                 ));
        }