예제 #1
0
        public override int GetHashCode()
        {
            int hashCode = 909107113;

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

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

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

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

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

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

            return(hashCode);
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is OrderReturnLineItemModifier other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((SourceModifierUid == null && other.SourceModifierUid == null) || (SourceModifierUid?.Equals(other.SourceModifierUid) == true)) &&
                   ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((BasePriceMoney == null && other.BasePriceMoney == null) || (BasePriceMoney?.Equals(other.BasePriceMoney) == true)) &&
                   ((TotalPriceMoney == null && other.TotalPriceMoney == null) || (TotalPriceMoney?.Equals(other.TotalPriceMoney) == true)));
        }