コード例 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is Order other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) &&
                   ((ReferenceId == null && other.ReferenceId == null) || (ReferenceId?.Equals(other.ReferenceId) == true)) &&
                   ((Source == null && other.Source == null) || (Source?.Equals(other.Source) == true)) &&
                   ((CustomerId == null && other.CustomerId == null) || (CustomerId?.Equals(other.CustomerId) == true)) &&
                   ((LineItems == null && other.LineItems == null) || (LineItems?.Equals(other.LineItems) == true)) &&
                   ((Taxes == null && other.Taxes == null) || (Taxes?.Equals(other.Taxes) == true)) &&
                   ((Discounts == null && other.Discounts == null) || (Discounts?.Equals(other.Discounts) == true)) &&
                   ((ServiceCharges == null && other.ServiceCharges == null) || (ServiceCharges?.Equals(other.ServiceCharges) == true)) &&
                   ((Fulfillments == null && other.Fulfillments == null) || (Fulfillments?.Equals(other.Fulfillments) == true)) &&
                   ((Returns == null && other.Returns == null) || (Returns?.Equals(other.Returns) == true)) &&
                   ((ReturnAmounts == null && other.ReturnAmounts == null) || (ReturnAmounts?.Equals(other.ReturnAmounts) == true)) &&
                   ((NetAmounts == null && other.NetAmounts == null) || (NetAmounts?.Equals(other.NetAmounts) == true)) &&
                   ((RoundingAdjustment == null && other.RoundingAdjustment == null) || (RoundingAdjustment?.Equals(other.RoundingAdjustment) == true)) &&
                   ((Tenders == null && other.Tenders == null) || (Tenders?.Equals(other.Tenders) == true)) &&
                   ((Refunds == null && other.Refunds == null) || (Refunds?.Equals(other.Refunds) == true)) &&
                   ((Metadata == null && other.Metadata == null) || (Metadata?.Equals(other.Metadata) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)) &&
                   ((ClosedAt == null && other.ClosedAt == null) || (ClosedAt?.Equals(other.ClosedAt) == true)) &&
                   ((State == null && other.State == null) || (State?.Equals(other.State) == true)) &&
                   ((Version == null && other.Version == null) || (Version?.Equals(other.Version) == true)) &&
                   ((TotalMoney == null && other.TotalMoney == null) || (TotalMoney?.Equals(other.TotalMoney) == true)) &&
                   ((TotalTaxMoney == null && other.TotalTaxMoney == null) || (TotalTaxMoney?.Equals(other.TotalTaxMoney) == true)) &&
                   ((TotalDiscountMoney == null && other.TotalDiscountMoney == null) || (TotalDiscountMoney?.Equals(other.TotalDiscountMoney) == true)) &&
                   ((TotalTipMoney == null && other.TotalTipMoney == null) || (TotalTipMoney?.Equals(other.TotalTipMoney) == true)) &&
                   ((TotalServiceChargeMoney == null && other.TotalServiceChargeMoney == null) || (TotalServiceChargeMoney?.Equals(other.TotalServiceChargeMoney) == true)) &&
                   ((PricingOptions == null && other.PricingOptions == null) || (PricingOptions?.Equals(other.PricingOptions) == true)) &&
                   ((Rewards == null && other.Rewards == null) || (Rewards?.Equals(other.Rewards) == true)));
        }