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

            if (DiscountCode.Length != 0)
            {
                hash ^= DiscountCode.GetHashCode();
            }
            if (VoucherCode.Length != 0)
            {
                hash ^= VoucherCode.GetHashCode();
            }
            if (Amount != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Amount);
            }
            if (ItemName.Length != 0)
            {
                hash ^= ItemName.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (ShippingAddress != null ? ShippingAddress.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (BillingAddress != null ? BillingAddress.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Note != null ? Note.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DiscountCode != null ? DiscountCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Phone != null ? Phone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ BuyerAcceptsMarketing.GetHashCode();
         return(hashCode);
     }
 }