コード例 #1
0
        public override int GetHashCode()
        {
            var componentClassHash = GoodsClass.GetHashCode();
            var fullNameHash       = FullName.GetHashCode();
            var partNumberHash     = PartNumber.GetHashCode();
            var descriptionHash    = Description.GetHashCode();

            return(componentClassHash ^ fullNameHash ^ partNumberHash ^ descriptionHash);
        }
コード例 #2
0
		public override int GetHashCode()
		{
			int detailTypeHash = GoodsClass != null ? GoodsClass.GetHashCode() : -1;
			int standartHash = Standart != null ? Standart.GetHashCode() : -1;
			int partNumberHash = PartNumber.GetHashCode();
			int descriptionHash = Description.GetHashCode();

			return detailTypeHash ^ standartHash ^ partNumberHash ^ descriptionHash;
		}
コード例 #3
0
        public int GetHashCode(AccessoryRequired other)
        {
            if (ReferenceEquals(other, null) == true)
            {
                return(0);
            }
            int standartHash = Standart != null?Standart.GetHashCode() : -1.GetHashCode();

            int partNumberHash  = PartNumber.GetHashCode();
            int descriptionHash = Description.GetHashCode();

            return(standartHash ^ partNumberHash ^ descriptionHash);
        }
コード例 #4
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (Upc != null)
                {
                    hashCode = hashCode * 59 + Upc.GetHashCode();
                }
                if (Ean != null)
                {
                    hashCode = hashCode * 59 + Ean.GetHashCode();
                }
                if (Isbn != null)
                {
                    hashCode = hashCode * 59 + Isbn.GetHashCode();
                }
                if (Asin != null)
                {
                    hashCode = hashCode * 59 + Asin.GetHashCode();
                }
                if (Title != null)
                {
                    hashCode = hashCode * 59 + Title.GetHashCode();
                }
                if (Sku != null)
                {
                    hashCode = hashCode * 59 + Sku.GetHashCode();
                }
                if (Mpn != null)
                {
                    hashCode = hashCode * 59 + Mpn.GetHashCode();
                }
                if (PartNumber != null)
                {
                    hashCode = hashCode * 59 + PartNumber.GetHashCode();
                }
                if (Upcs != null)
                {
                    hashCode = hashCode * 59 + Upcs.GetHashCode();
                }
                if (Description != null)
                {
                    hashCode = hashCode * 59 + Description.GetHashCode();
                }
                if (Brand != null)
                {
                    hashCode = hashCode * 59 + Brand.GetHashCode();
                }
                if (Manufacturer != null)
                {
                    hashCode = hashCode * 59 + Manufacturer.GetHashCode();
                }
                if (Color != null)
                {
                    hashCode = hashCode * 59 + Color.GetHashCode();
                }

                hashCode = hashCode * 59 + NewPrice.GetHashCode();

                hashCode = hashCode * 59 + UsedPrice.GetHashCode();
                if (CurrencyCode != null)
                {
                    hashCode = hashCode * 59 + CurrencyCode.GetHashCode();
                }
                if (Url != null)
                {
                    hashCode = hashCode * 59 + Url.GetHashCode();
                }
                if (Features != null)
                {
                    hashCode = hashCode * 59 + Features.GetHashCode();
                }
                if (Dimensions != null)
                {
                    hashCode = hashCode * 59 + Dimensions.GetHashCode();
                }
                if (Images != null)
                {
                    hashCode = hashCode * 59 + Images.GetHashCode();
                }
                if (MatchedItems != null)
                {
                    hashCode = hashCode * 59 + MatchedItems.GetHashCode();
                }
                if (IsoCountryCodes != null)
                {
                    hashCode = hashCode * 59 + IsoCountryCodes.GetHashCode();
                }
                if (CompanyName != null)
                {
                    hashCode = hashCode * 59 + CompanyName.GetHashCode();
                }
                if (CompanyAddress != null)
                {
                    hashCode = hashCode * 59 + CompanyAddress.GetHashCode();
                }
                if (Categories != null)
                {
                    hashCode = hashCode * 59 + Categories.GetHashCode();
                }
                if (CategoryHierarchies != null)
                {
                    hashCode = hashCode * 59 + CategoryHierarchies.GetHashCode();
                }
                return(hashCode);
            }
        }
コード例 #5
0
 public override int GetHashCode()
 {
     return(PartNumber.GetHashCode());
 }