Пример #1
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Bytes != null ? Bytes.GetHashCode() : 0) * 397) ^ Subtype.GetHashCode());
     }
 }
Пример #2
0
        public override int GetHashCode()
        {
            var result = Type.GetHashCode();

            result = (31 * result) + Subtype.GetHashCode();
            result = (31 * result) + Parameters.GetHashCode();
            return(result);
        }
Пример #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = base.GetHashCode();
         result = (result * 397) ^ (TopLevelMediaType != null ? TopLevelMediaType.GetHashCode() : 0);
         result = (result * 397) ^ (Subtype != null ? Subtype.GetHashCode() : 0);
         foreach (string parameterName in Parameters.Keys)
         {
             result = (result * 397) ^ (parameterName + Parameters[parameterName]).GetHashCode();
         }
         return(result);
     }
 }
Пример #4
0
 public override int GetHashCode() => word.GetHashCode() |
 type.GetHashCode() |
 subType.GetHashCode();
Пример #5
0
 public override int GetHashCode()
 {
     // ReSharper disable NonReadonlyMemberInGetHashCode
     return(((Type != null) ? Type.GetHashCode() : 0) * 397 ^ ((Subtype != null) ? Subtype.GetHashCode() : 0));
     // ReSharper restore NonReadonlyMemberInGetHashCode
 }
Пример #6
0
        public override int GetHashCode()
        {
            int hash = Name.GetHashCode();

            if (Item != null)
            {
                hash ^= Item.GetHashCode();
            }
            hash ^= CrewSkillId.GetHashCode();
            hash ^= SkillOrange.GetHashCode();
            hash ^= SkillYellow.GetHashCode();
            hash ^= SkillGreen.GetHashCode();
            hash ^= SkillGrey.GetHashCode();
            if (Mat1 != null)
            {
                hash ^= Mat1.GetHashCode();
                hash ^= Mat1Quantity;
            }
            if (Mat2 != null)
            {
                hash ^= Mat2.GetHashCode();
                hash ^= Mat2Quantity.GetHashCode();
            }
            if (Mat3 != null)
            {
                hash ^= Mat3.GetHashCode();
                hash ^= Mat3Quantity.GetHashCode();
            }
            if (Mat4 != null)
            {
                hash ^= Mat4.GetHashCode();
                hash ^= Mat4Quantity.GetHashCode();
            }
            if (Mat5 != null)
            {
                hash ^= Mat5.GetHashCode();
                hash ^= Mat5Quantity.GetHashCode();
            }
            hash ^= CraftingTime.GetHashCode();
            hash ^= Subtype.GetHashCode();
            if (Research1 != null)
            {
                hash ^= CraftingTimeT1.GetHashCode();
                hash ^= Research1.GetHashCode();
                hash ^= ResearchChance1.GetHashCode();
                hash ^= ResearchQuantity1.GetHashCode();
            }
            if (Research2 != null)
            {
                hash ^= CraftingTimeT2.GetHashCode();
                hash ^= Research2.GetHashCode();
                hash ^= ResearchChance2.GetHashCode();
                hash ^= ResearchQuantity2.GetHashCode();
            }
            if (Research3 != null)
            {
                hash ^= CraftingTimeT3.GetHashCode();
                hash ^= Research3.GetHashCode();
                hash ^= ResearchChance3.GetHashCode();
                hash ^= ResearchQuantity3.GetHashCode();
            }
            hash ^= MissionCost.GetHashCode();
            if (MissionDescription != null)
            {
                hash ^= MissionDescription.GetHashCode();
            }
            hash ^= MissionUnlockable.GetHashCode();
            hash ^= MissionLight.GetHashCode();
            hash ^= MissionLightCrit.GetHashCode();
            hash ^= MissionDark.GetHashCode();
            hash ^= MissionDarkCrit.GetHashCode();
            hash ^= TrainingCost.GetHashCode();
            hash ^= DisableDisassemble.GetHashCode();
            hash ^= DisableCritical.GetHashCode();
            hash ^= MissionFaction.GetHashCode();
            if (MissionYieldDescription != null)
            {
                hash ^= MissionYieldDescription.GetHashCode();
            }
            hash ^= Deprecated.GetHashCode();
            return(hash);
        }