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

            if (DiscountId != 0)
            {
                hash ^= DiscountId.GetHashCode();
            }
            if (Code.Length != 0)
            {
                hash ^= Code.GetHashCode();
            }
            if (Amount != 0)
            {
                hash ^= Amount.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Address1 != null ? Address1.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Address2 != null ? Address2.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CartNote != null ? CartNote.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Company != null ? Company.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Country != null ? Country.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CreatedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ CustomerId.GetHashCode();
         hashCode = (hashCode * 397) ^ DiscountId.GetHashCode();
         hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Phone != null ? Phone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Province != null ? Province.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ (Zip != null ? Zip.GetHashCode() : 0);
         return(hashCode);
     }
 }
        public override int GetHashCode()
        {
            int hashCode = -988778351;

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

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

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

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

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

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

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

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

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

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

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

            return(hashCode);
        }