Пример #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is OrderReturnLineItem other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((SourceLineItemUid == null && other.SourceLineItemUid == null) || (SourceLineItemUid?.Equals(other.SourceLineItemUid) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((Quantity == null && other.Quantity == null) || (Quantity?.Equals(other.Quantity) == true)) &&
                   ((QuantityUnit == null && other.QuantityUnit == null) || (QuantityUnit?.Equals(other.QuantityUnit) == true)) &&
                   ((Note == null && other.Note == null) || (Note?.Equals(other.Note) == true)) &&
                   ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) &&
                   ((VariationName == null && other.VariationName == null) || (VariationName?.Equals(other.VariationName) == true)) &&
                   ((ReturnModifiers == null && other.ReturnModifiers == null) || (ReturnModifiers?.Equals(other.ReturnModifiers) == true)) &&
                   ((AppliedTaxes == null && other.AppliedTaxes == null) || (AppliedTaxes?.Equals(other.AppliedTaxes) == true)) &&
                   ((AppliedDiscounts == null && other.AppliedDiscounts == null) || (AppliedDiscounts?.Equals(other.AppliedDiscounts) == true)) &&
                   ((BasePriceMoney == null && other.BasePriceMoney == null) || (BasePriceMoney?.Equals(other.BasePriceMoney) == true)) &&
                   ((VariationTotalPriceMoney == null && other.VariationTotalPriceMoney == null) || (VariationTotalPriceMoney?.Equals(other.VariationTotalPriceMoney) == true)) &&
                   ((GrossReturnMoney == null && other.GrossReturnMoney == null) || (GrossReturnMoney?.Equals(other.GrossReturnMoney) == true)) &&
                   ((TotalTaxMoney == null && other.TotalTaxMoney == null) || (TotalTaxMoney?.Equals(other.TotalTaxMoney) == true)) &&
                   ((TotalDiscountMoney == null && other.TotalDiscountMoney == null) || (TotalDiscountMoney?.Equals(other.TotalDiscountMoney) == true)) &&
                   ((TotalMoney == null && other.TotalMoney == null) || (TotalMoney?.Equals(other.TotalMoney) == true)));
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is OrderServiceCharge other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) &&
                   ((Percentage == null && other.Percentage == null) || (Percentage?.Equals(other.Percentage) == true)) &&
                   ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) &&
                   ((AppliedMoney == null && other.AppliedMoney == null) || (AppliedMoney?.Equals(other.AppliedMoney) == true)) &&
                   ((TotalMoney == null && other.TotalMoney == null) || (TotalMoney?.Equals(other.TotalMoney) == true)) &&
                   ((TotalTaxMoney == null && other.TotalTaxMoney == null) || (TotalTaxMoney?.Equals(other.TotalTaxMoney) == true)) &&
                   ((CalculationPhase == null && other.CalculationPhase == null) || (CalculationPhase?.Equals(other.CalculationPhase) == true)) &&
                   ((Taxable == null && other.Taxable == null) || (Taxable?.Equals(other.Taxable) == true)) &&
                   ((AppliedTaxes == null && other.AppliedTaxes == null) || (AppliedTaxes?.Equals(other.AppliedTaxes) == true)) &&
                   ((Metadata == null && other.Metadata == null) || (Metadata?.Equals(other.Metadata) == true)));
        }
Пример #3
0
        public override int GetHashCode()
        {
            int hashCode = 1299728447;

            if (Uid != null)
            {
                hashCode += Uid.GetHashCode();
            }

            if (SourceLineItemUid != null)
            {
                hashCode += SourceLineItemUid.GetHashCode();
            }

            if (Name != null)
            {
                hashCode += Name.GetHashCode();
            }

            if (Quantity != null)
            {
                hashCode += Quantity.GetHashCode();
            }

            if (QuantityUnit != null)
            {
                hashCode += QuantityUnit.GetHashCode();
            }

            if (Note != null)
            {
                hashCode += Note.GetHashCode();
            }

            if (CatalogObjectId != null)
            {
                hashCode += CatalogObjectId.GetHashCode();
            }

            if (VariationName != null)
            {
                hashCode += VariationName.GetHashCode();
            }

            if (ReturnModifiers != null)
            {
                hashCode += ReturnModifiers.GetHashCode();
            }

            if (AppliedTaxes != null)
            {
                hashCode += AppliedTaxes.GetHashCode();
            }

            if (AppliedDiscounts != null)
            {
                hashCode += AppliedDiscounts.GetHashCode();
            }

            if (BasePriceMoney != null)
            {
                hashCode += BasePriceMoney.GetHashCode();
            }

            if (VariationTotalPriceMoney != null)
            {
                hashCode += VariationTotalPriceMoney.GetHashCode();
            }

            if (GrossReturnMoney != null)
            {
                hashCode += GrossReturnMoney.GetHashCode();
            }

            if (TotalTaxMoney != null)
            {
                hashCode += TotalTaxMoney.GetHashCode();
            }

            if (TotalDiscountMoney != null)
            {
                hashCode += TotalDiscountMoney.GetHashCode();
            }

            if (TotalMoney != null)
            {
                hashCode += TotalMoney.GetHashCode();
            }

            return(hashCode);
        }
        public override int GetHashCode()
        {
            int hashCode = 1266271501;

            if (Uid != null)
            {
                hashCode += Uid.GetHashCode();
            }

            if (Name != null)
            {
                hashCode += Name.GetHashCode();
            }

            if (CatalogObjectId != null)
            {
                hashCode += CatalogObjectId.GetHashCode();
            }

            if (Percentage != null)
            {
                hashCode += Percentage.GetHashCode();
            }

            if (AmountMoney != null)
            {
                hashCode += AmountMoney.GetHashCode();
            }

            if (AppliedMoney != null)
            {
                hashCode += AppliedMoney.GetHashCode();
            }

            if (TotalMoney != null)
            {
                hashCode += TotalMoney.GetHashCode();
            }

            if (TotalTaxMoney != null)
            {
                hashCode += TotalTaxMoney.GetHashCode();
            }

            if (CalculationPhase != null)
            {
                hashCode += CalculationPhase.GetHashCode();
            }

            if (Taxable != null)
            {
                hashCode += Taxable.GetHashCode();
            }

            if (AppliedTaxes != null)
            {
                hashCode += AppliedTaxes.GetHashCode();
            }

            if (Metadata != null)
            {
                hashCode += Metadata.GetHashCode();
            }

            return(hashCode);
        }
Пример #5
0
        public override int GetHashCode()
        {
            int hashCode = 441365892;

            if (Uid != null)
            {
                hashCode += Uid.GetHashCode();
            }

            if (Name != null)
            {
                hashCode += Name.GetHashCode();
            }

            if (Quantity != null)
            {
                hashCode += Quantity.GetHashCode();
            }

            if (QuantityUnit != null)
            {
                hashCode += QuantityUnit.GetHashCode();
            }

            if (Note != null)
            {
                hashCode += Note.GetHashCode();
            }

            if (CatalogObjectId != null)
            {
                hashCode += CatalogObjectId.GetHashCode();
            }

            if (VariationName != null)
            {
                hashCode += VariationName.GetHashCode();
            }

            if (Metadata != null)
            {
                hashCode += Metadata.GetHashCode();
            }

            if (Modifiers != null)
            {
                hashCode += Modifiers.GetHashCode();
            }

            if (AppliedTaxes != null)
            {
                hashCode += AppliedTaxes.GetHashCode();
            }

            if (AppliedDiscounts != null)
            {
                hashCode += AppliedDiscounts.GetHashCode();
            }

            if (BasePriceMoney != null)
            {
                hashCode += BasePriceMoney.GetHashCode();
            }

            if (VariationTotalPriceMoney != null)
            {
                hashCode += VariationTotalPriceMoney.GetHashCode();
            }

            if (GrossSalesMoney != null)
            {
                hashCode += GrossSalesMoney.GetHashCode();
            }

            if (TotalTaxMoney != null)
            {
                hashCode += TotalTaxMoney.GetHashCode();
            }

            if (TotalDiscountMoney != null)
            {
                hashCode += TotalDiscountMoney.GetHashCode();
            }

            if (TotalMoney != null)
            {
                hashCode += TotalMoney.GetHashCode();
            }

            if (PricingBlocklists != null)
            {
                hashCode += PricingBlocklists.GetHashCode();
            }

            return(hashCode);
        }