Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (CategoryId != 0)
            {
                hash ^= CategoryId.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Details.Length != 0)
            {
                hash ^= Details.GetHashCode();
            }
            if (Price != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Price);
            }
            if (StockQuantity != 0)
            {
                hash ^= StockQuantity.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 2
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 (CategoryId != null)
         {
             hashCode = hashCode * 59 + CategoryId.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Info != null)
         {
             hashCode = hashCode * 59 + Info.GetHashCode();
         }
         if (CategoryItems != null)
         {
             hashCode = hashCode * 59 + CategoryItems.GetHashCode();
         }
         if (Buy != null)
         {
             hashCode = hashCode * 59 + Buy.GetHashCode();
         }
         if (Sell != null)
         {
             hashCode = hashCode * 59 + Sell.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 3
0
        public override int GetHashCode()
        {
            int hash = Title.GetHashCode();

            hash ^= Text.GetHashCode();
            hash ^= Level.GetHashCode();
            if (Image != null)
            {
                hash ^= Image.GetHashCode();
            }
            hash ^= CategoryId.GetHashCode();
            hash ^= Faction.GetHashCode();
            hash ^= IsHidden.GetHashCode();
            if (ClassRestricted)
            {
                foreach (var x in Classes)
                {
                    hash ^= x.Fqn.GetHashCode();
                }
            }
            if (HasPlanets)
            {
                foreach (var x in Planets)
                {
                    hash ^= x.Id.GetHashCode();
                }
            }
            return(hash);
        }
Ejemplo n.º 4
0
 public override int GetHashCode()
 {
     unchecked {
         const int randomPrime = 397;
         int       hashCode    = Id.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ (FullDocumentFileName != null ? FullDocumentFileName.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (FreeSnippetFileName != null ? FreeSnippetFileName.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (OriginalFileName != null ? OriginalFileName.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Title != null ? Title.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Degree != null ? Degree.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (CourseName != null ? CourseName.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (CourseCode != null ? CourseCode.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Year != null ? Year.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ UniversityId.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ UploadedBy.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ UploadedAt.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ (DeletedAt != null ? DeletedAt.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ IsFree.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ (IsApproved != null ? IsApproved.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Hash != null ? Hash.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (MinHashSignature != null ? MinHashSignature.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ CategoryId.GetHashCode();
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = DeliveryType.GetHashCode();
         hashCode = (hashCode * 397) ^ CategoryId.GetHashCode();
         hashCode = (hashCode * 397) ^ ReceiverSubscriberId.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 6
0
    // If Equals() returns true for a pair of objects
    // then GetHashCode() must return the same value for these objects.
    public override int GetHashCode()
    {
        //Get hash code for the Name field if it is not null.
        int hashProductName = Name == null ? 0 : Name.GetHashCode();
        //Get hash code for the Code field.
        int hashProductCode = CategoryId.GetHashCode();

        //Calculate the hash code for the product.
        return(hashProductName ^ hashProductCode);
    }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (CategoryId != null ? CategoryId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (StreamId != null ? StreamId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CommentId != null ? CommentId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Comment != null ? Comment.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 8
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (FacultyId != null ? FacultyId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Code != null ? Code.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CategoryId != null ? CategoryId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Value;
         hashCode = (hashCode * 397) ^ Count;
         return(hashCode);
     }
 }
Ejemplo n.º 9
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CategoryId.GetHashCode();
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FriendlyName != null ? FriendlyName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CategoryUrl != null ? CategoryUrl.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CouponsCount.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 10
0
        public override int GetHashCode()
        {
            int hash = 11;

            hash = hash * 13 + Id.GetHashCode();
            hash = hash * 13 + Name.GetHashCode();
            hash = hash * 13 + Description.GetHashCode();
            hash = hash * 13 + Price.GetHashCode();
            hash = hash * 13 + Stock.GetHashCode();
            //   hash = hash * 13 + Picture.GetHashCode();
            hash = hash * 13 + CategoryId.GetHashCode();
            return(hash);
        }
Ejemplo n.º 11
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CategoryId != 0)
            {
                hash ^= CategoryId.GetHashCode();
            }
            if (UserId.Length != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 12
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CategoryId != 0)
            {
                hash ^= CategoryId.GetHashCode();
            }
            if (Popularity != 0)
            {
                hash ^= Popularity.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 13
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 :)

                hashCode = hashCode * 59 + CategoryId.GetHashCode();
                if (Name != null)
                {
                    hashCode = hashCode * 59 + Name.GetHashCode();
                }
                return(hashCode);
            }
        }
Ejemplo n.º 14
0
        public override int GetHashCode()
        {
            int hashCode = 1328192014;

            hashCode = hashCode * -1521134295 + Id.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Image);

            hashCode = hashCode * -1521134295 + Rank.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Description);

            hashCode = hashCode * -1521134295 + AgeAllowed.GetHashCode();
            hashCode = hashCode * -1521134295 + Duration.GetHashCode();
            hashCode = hashCode * -1521134295 + CategoryId.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <Category> .Default.GetHashCode(Category);

            return(hashCode);
        }
Ejemplo n.º 15
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (CategoryId != 0)
            {
                hash ^= CategoryId.GetHashCode();
            }
            if (category_ != null)
            {
                hash ^= Category.GetHashCode();
            }
            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (Date != 0UL)
            {
                hash ^= Date.GetHashCode();
            }
            if (Cents != 0)
            {
                hash ^= Cents.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (Card.Length != 0)
            {
                hash ^= Card.GetHashCode();
            }
            if (CheckNumber != 0)
            {
                hash ^= CheckNumber.GetHashCode();
            }
            return(hash);
        }
 /// <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 (ManufacturerId != null)
         {
             hashCode = hashCode * 59 + ManufacturerId.GetHashCode();
         }
         if (CategoryId != null)
         {
             hashCode = hashCode * 59 + CategoryId.GetHashCode();
         }
         if (ProductName != null)
         {
             hashCode = hashCode * 59 + ProductName.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 17
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (BarCode != null ? BarCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Price.GetHashCode();
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsPublished.GetHashCode();
         hashCode = (hashCode * 397) ^ (Dimensions != null ? Dimensions.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ManufacturerId.GetHashCode();
         hashCode = (hashCode * 397) ^ (Pictures != null ? Pictures.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CategoryId.GetHashCode();
         hashCode = (hashCode * 397) ^ (Category != null ? Category.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ProductTypeId;
         hashCode = (hashCode * 397) ^ (ProductType != null ? ProductType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ExternalSourceName != null ? ExternalSourceName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ExternalId != null ? ExternalId.GetHashCode() : 0);
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     return(CategoryId.GetHashCode());
 }
Ejemplo n.º 19
0
        public override int GetHashCode()
        {
            int hashCategoryId = CategoryId.GetHashCode();

            return(hashCategoryId);
        }
Ejemplo n.º 20
0
 public override int GetHashCode()
 {
     return(-2133319772 + CategoryId.GetHashCode());
 }
Ejemplo n.º 21
0
 public override int GetHashCode()
 {
     return(2108858624 + CategoryId.GetHashCode());
 }
Ejemplo n.º 22
0
 /// <summary>
 /// 获取哈希码。
 /// </summary>
 /// <returns>返回 32 位整数。</returns>
 public override int GetHashCode()
 => CategoryId.GetHashCode() ^ Title.CompatibleGetHashCode();
Ejemplo n.º 23
0
        public override int GetHashCode()
        {
            int hashCode = -268666674;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            return(hashCode);
        }