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

            return
                ((
                     TypeId == input.TypeId ||
                     (TypeId != null &&
                      TypeId.Equals(input.TypeId))
                     ) &&
                 (
                     Profile == input.Profile ||
                     (Profile != null &&
                      Profile.Equals(input.Profile))
                 ) &&
                 (
                     Capacity == input.Capacity ||
                     Capacity != null &&
                     Capacity.SequenceEqual(input.Capacity)
                 ) &&
                 (
                     SpeedFactor == input.SpeedFactor ||
                     (SpeedFactor != null &&
                      SpeedFactor.Equals(input.SpeedFactor))
                 ) &&
                 (
                     ServiceTimeFactor == input.ServiceTimeFactor ||
                     (ServiceTimeFactor != null &&
                      ServiceTimeFactor.Equals(input.ServiceTimeFactor))
                 ) &&
                 (
                     CostPerMeter == input.CostPerMeter ||
                     (CostPerMeter != null &&
                      CostPerMeter.Equals(input.CostPerMeter))
                 ) &&
                 (
                     CostPerSecond == input.CostPerSecond ||
                     (CostPerSecond != null &&
                      CostPerSecond.Equals(input.CostPerSecond))
                 ) &&
                 (
                     CostPerActivation == input.CostPerActivation ||
                     (CostPerActivation != null &&
                      CostPerActivation.Equals(input.CostPerActivation))
                 ));
        }