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

            return
                ((
                     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)
                 ));
        }
Ejemplo n.º 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))
                 ));
        }