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

            return
                ((
                     AirlineClass == other.AirlineClass ||
                     AirlineClass != null &&
                     AirlineClass.Equals(other.AirlineClass)
                     ) &&
                 (
                     ArrivalAirport == other.ArrivalAirport ||
                     ArrivalAirport != null &&
                     ArrivalAirport.Equals(other.ArrivalAirport)
                 ) &&
                 (
                     ArrivalTime == other.ArrivalTime ||
                     ArrivalTime != null &&
                     ArrivalTime.Equals(other.ArrivalTime)
                 ) &&
                 (
                     CarrierCode == other.CarrierCode ||
                     CarrierCode != null &&
                     CarrierCode.Equals(other.CarrierCode)
                 ) &&
                 (
                     ConjunctionTicket == other.ConjunctionTicket ||
                     ConjunctionTicket != null &&
                     ConjunctionTicket.Equals(other.ConjunctionTicket)
                 ) &&
                 (
                     CouponNumber == other.CouponNumber ||
                     CouponNumber != null &&
                     CouponNumber.Equals(other.CouponNumber)
                 ) &&
                 (
                     Date == other.Date ||
                     Date != null &&
                     Date.Equals(other.Date)
                 ) &&
                 (
                     DepartureTime == other.DepartureTime ||
                     DepartureTime != null &&
                     DepartureTime.Equals(other.DepartureTime)
                 ) &&
                 (
                     EndorsementOrRestriction == other.EndorsementOrRestriction ||
                     EndorsementOrRestriction != null &&
                     EndorsementOrRestriction.Equals(other.EndorsementOrRestriction)
                 ) &&
                 (
                     ExchangeTicket == other.ExchangeTicket ||
                     ExchangeTicket != null &&
                     ExchangeTicket.Equals(other.ExchangeTicket)
                 ) &&
                 (
                     Fare == other.Fare ||
                     Fare != null &&
                     Fare.Equals(other.Fare)
                 ) &&
                 (
                     FareBasis == other.FareBasis ||
                     FareBasis != null &&
                     FareBasis.Equals(other.FareBasis)
                 ) &&
                 (
                     Fee == other.Fee ||
                     Fee != null &&
                     Fee.Equals(other.Fee)
                 ) &&
                 (
                     FlightNumber == other.FlightNumber ||
                     FlightNumber != null &&
                     FlightNumber.Equals(other.FlightNumber)
                 ) &&
                 (
                     Number == other.Number ||
                     Number != null &&
                     Number.Equals(other.Number)
                 ) &&
                 (
                     OriginAirport == other.OriginAirport ||
                     OriginAirport != null &&
                     OriginAirport.Equals(other.OriginAirport)
                 ) &&
                 (
                     PassengerClass == other.PassengerClass ||
                     PassengerClass != null &&
                     PassengerClass.Equals(other.PassengerClass)
                 ) &&
                 (
                     ServiceClass == other.ServiceClass ||
                     ServiceClass != null &&
                     ServiceClass.Equals(other.ServiceClass)
                 ) &&
                 (
                     StopoverCode == other.StopoverCode ||
                     StopoverCode != null &&
                     StopoverCode.Equals(other.StopoverCode)
                 ) &&
                 (
                     Taxes == other.Taxes ||
                     Taxes != null &&
                     Taxes.Equals(other.Taxes)
                 ));
        }