コード例 #1
0
        public override int GetHashCode()
        {
            int hashCode = 1460876522;

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

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

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

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

            return(hashCode);
        }
コード例 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Information.Length != 0)
            {
                hash ^= Information.GetHashCode();
            }
            if (CategoryName.Length != 0)
            {
                hash ^= CategoryName.GetHashCode();
            }
            if (category_ != null)
            {
                hash ^= Category.GetHashCode();
            }
            return(hash);
        }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Id.GetHashCode() * 397) ^ (CategoryName != null ? CategoryName.GetHashCode() : 0));
     }
 }
コード例 #4
0
ファイル: Requisition.cs プロジェクト: sebrandon1/HaloSharp
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CategoryName?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ CertificationRequisitionId.GetHashCode();
         hashCode = (hashCode * 397) ^ ContentId.GetHashCode();
         hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (InternalCategoryName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (InternalSubcategoryName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ IsCertification.GetHashCode();
         hashCode = (hashCode * 397) ^ IsMythic.GetHashCode();
         hashCode = (hashCode * 397) ^ IsWearable.GetHashCode();
         hashCode = (hashCode * 397) ^ HideIfNotAcquired.GetHashCode();
         hashCode = (hashCode * 397) ^ (LargeImageUrl?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ LevelRequirement;
         hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Rarity?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)RarityType;
         hashCode = (hashCode * 397) ^ SellPrice;
         hashCode = (hashCode * 397) ^ (SubcategoryName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ SubcategoryOrder;
         hashCode = (hashCode * 397) ^ (SupportedGameModes?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)UseType;
         return(hashCode);
     }
 }
コード例 #5
0
        public override int GetHashCode()
        {
            var hash = 17;

            hash = hash * 23 + CategoryName.GetHashCode();
            hash = hash * 23 + CounterName.GetHashCode();
            return(hash);
        }
コード例 #6
0
 public override int GetHashCode()
 {
     if (CategoryName == null || PropertyName == null)
     {
         return(TranslatedText.GetHashCode());
     }
     return(CategoryName.GetHashCode() ^ PropertyName.GetHashCode());
 }
コード例 #7
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CategoryName?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (CounterName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (InstanceName?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
コード例 #8
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (CategoryName != null ? CategoryName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Picture != null ? Picture.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #9
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Repetitions.GetHashCode();
         hashCode = (hashCode * 397) ^ (CategoryName != null ? CategoryName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (UnitType != null ? UnitType.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #10
0
ファイル: CategoryDiscount.cs プロジェクト: maorRoz/Sadna
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (SystemId != null ? SystemId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (StoreName != null ? StoreName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CategoryName != null ? CategoryName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ StartDate.GetHashCode();
         hashCode = (hashCode * 397) ^ EndDate.GetHashCode();
         hashCode = (hashCode * 397) ^ DiscountAmount;
         return(hashCode);
     }
 }
コード例 #11
0
        /// <summary>
        /// Provides a representative hash code for objects of this type to spread out distribution
        /// in hash tables.
        /// </summary>
        /// <remarks>Objects which consider themselves to be Equal (a.Equals(b) returns true) are
        /// expected to have the same hash code.  Objects which are not Equal may have the same
        /// hash code, but minimizing such overlaps helps with efficient operation of hash tables.
        /// </remarks>
        /// <returns>
        /// an int representing the hash code calculated for the contents of this object
        /// </returns>
        public override int GetHashCode()
        {
            int myHash = base.GetHashCode(); // Fold in hash code for inherited base type

            myHash ^= (int)Severity;         // Fold in Severity (enum) as an int as its own hash code
            myHash ^= Id.GetHashCode();      // Fold in hash code for GUID
            if (Caption != null)
            {
                myHash ^= Caption.GetHashCode();                  // Fold in hash code for string Caption
            }
            if (Description != null)
            {
                myHash ^= Description.GetHashCode();                      // Fold in hash code for string Caption
            }
            if (Details != null)
            {
                myHash ^= Details.GetHashCode();                  // Fold in hash code for string Caption
            }
            if (LogSystem != null)
            {
                myHash ^= LogSystem.GetHashCode();                    // Fold in hash code for string LogSystem
            }
            if (CategoryName != null)
            {
                myHash ^= CategoryName.GetHashCode();                       // Fold in hash code for string CategoryName
            }
            if (UserName != null)
            {
                myHash ^= UserName.GetHashCode();                   // Fold in hash code for string UserName
            }
            if (MethodName != null)
            {
                myHash ^= MethodName.GetHashCode();                     // Fold in hash code for string MethodName
            }
            if (ClassName != null)
            {
                myHash ^= ClassName.GetHashCode();                    // Fold in hash code for string ClassName
            }
            if (FileName != null)
            {
                myHash ^= FileName.GetHashCode(); // Fold in hash code for string FileName
            }
            myHash ^= LineNumber;                 // Fold in LineNumber int as its own hash code
            myHash ^= ThreadId;                   // Fold in ThreadId int as its own hash code

            // Session member is not used in Equals, so we can't use it in hash calculation!

            return(myHash);
        }
コード例 #12
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 (CategoryName != null)
         {
             hashCode = hashCode * 59 + CategoryName.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         // if (PhotoUrls != null)
         // hashCode = hashCode * 59 + PhotoUrls.GetHashCode();
         if (Tags != null)
         {
             hashCode = hashCode * 59 + Tags.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #13
0
 /// <summary>
 /// Liefert den Hashcode dieser Instanz.
 /// </summary>
 /// <returns>Der Hashcode der Instanz.</returns>
 public override int GetHashCode()
 {
     return(CategoryName.GetHashCode() ^ Term.GetHashCode());
 }
コード例 #14
0
 /// <summary>
 /// Liefert den Hashcode dieser Instanz.
 /// </summary>
 /// <returns>Der Hashcode der Instanz.</returns>
 public override int GetHashCode()
 {
     return(CategoryName.GetHashCode() ^ Domain.GetHashCode());
 }
コード例 #15
0
ファイル: ci.cs プロジェクト: moguorg/moglabo
 public override int GetHashCode()
 {
     return(Name.GetHashCode() ^ CategoryName.GetHashCode() ^ Count);
 }
コード例 #16
0
 public override int GetHashCode()
 {
     return(ProductNames.Aggregate(
                CategoryName.GetHashCode(),
                (current, productName) => current ^ productName.GetHashCode()));
 }
コード例 #17
0
ファイル: Products.cs プロジェクト: Anreldion/Task-01
 /// <summary>
 /// Получить числовое значение продукта
 /// </summary>
 /// <returns>Возвращает Hash Code продукта</returns>
 public override int GetHashCode()
 {
     return(CompositionList.GetHashCode() + Calories.GetHashCode() + Price.GetHashCode() + MarginCoefficient.GetHashCode() + CategoryName.GetHashCode() + ProductName.GetHashCode());
 }