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

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

            return
                ((
                     Address == other.Address ||
                     Address != null &&
                     Address.Equals(other.Address)
                     ) &&
                 (
                     OrderTotal == other.OrderTotal ||
                     OrderTotal != null &&
                     OrderTotal.Equals(other.OrderTotal)
                 ) &&
                 (
                     OrderDate == other.OrderDate ||
                     OrderDate != null &&
                     OrderDate.Equals(other.OrderDate)
                 ) &&
                 (
                     ArrivalDate == other.ArrivalDate ||
                     ArrivalDate != null &&
                     ArrivalDate.Equals(other.ArrivalDate)
                 ) &&
                 (
                     Items == other.Items ||
                     Items != null &&
                     Items.Equals(other.Items)
                 ) &&
                 (
                     OrderId == other.OrderId ||
                     OrderId != null &&
                     OrderId.Equals(other.OrderId)
                 ));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Returns true if AdditionalOrderInput instances are equal
        /// </summary>
        /// <param name="other">Instance of AdditionalOrderInput to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(AdditionalOrderInput other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     AirlineData == other.AirlineData ||
                     AirlineData != null &&
                     AirlineData.Equals(other.AirlineData)
                     ) &&
                 (
                     Level3SummaryData == other.Level3SummaryData ||
                     Level3SummaryData != null &&
                     Level3SummaryData.Equals(other.Level3SummaryData)
                 ) &&
                 (
                     NumberOfInstallments == other.NumberOfInstallments ||
                     NumberOfInstallments != null &&
                     NumberOfInstallments.Equals(other.NumberOfInstallments)
                 ) &&
                 (
                     OrderDate == other.OrderDate ||
                     OrderDate != null &&
                     OrderDate.Equals(other.OrderDate)
                 ) &&
                 (
                     TypeInformation == other.TypeInformation ||
                     TypeInformation != null &&
                     TypeInformation.Equals(other.TypeInformation)
                 ));
        }
Ejemplo n.º 4
0
 public bool Equals(Order other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Id == other.Id && string.Equals(CustomerId, other.CustomerId) && EmployeeId == other.EmployeeId && OrderDate.Equals(other.OrderDate) && RequiredDate.Equals(other.RequiredDate) && ShippedDate.Equals(other.ShippedDate) && ShipVia == other.ShipVia && Freight == other.Freight && string.Equals(ShipName, other.ShipName) && string.Equals(ShipAddress, other.ShipAddress) && string.Equals(ShipCity, other.ShipCity) && string.Equals(ShipRegion, other.ShipRegion) && string.Equals(ShipPostalCode, other.ShipPostalCode) && string.Equals(ShipCountry, other.ShipCountry));
 }
 private bool Equals(Order other)
 {
     return(OrderId.Equals(other.OrderId) && Count == other.Count && OrderDate.Equals(other.OrderDate) &&
            UnitPrice == other.UnitPrice && string.Equals(UserName, other.UserName));
 }