예제 #1
0
        public override int GetHashCode()
        {
            var hashCode = -595725116;

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

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

            hashCode = hashCode * -1521134295 + ResistenceMax.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string[]> .Default.GetHashCode(Origins);

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

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

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

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

            hashCode = hashCode * -1521134295 + Playable.GetHashCode();
            hashCode = hashCode * -1521134295 + RechargeMax.GetHashCode();
            hashCode = hashCode * -1521134295 + DamageMax.GetHashCode();
            hashCode = hashCode * -1521134295 + RecoveryMax.GetHashCode();
            hashCode = hashCode * -1521134295 + RegenerationMax.GetHashCode();
            hashCode = hashCode * -1521134295 + RecoveryBase.GetHashCode();
            hashCode = hashCode * -1521134295 + RegenerationBase.GetHashCode();
            hashCode = hashCode * -1521134295 + ThreatBase.GetHashCode();
            hashCode = hashCode * -1521134295 + PerceptionBase.GetHashCode();
            return(hashCode);
        }
예제 #2
0
        public override int GetHashCode()
        {
            // https://www.loganfranken.com/blog/692/overriding-equals-in-c-part-2/
            unchecked
            {
                const int hashingBase       = (int)2166136261;
                const int hashingMultiplier = 16777619;

                int hash = hashingBase;
                hash = (hash * hashingMultiplier) ^
                       (!ReferenceEquals(null, SubjectName) ? SubjectName.GetHashCode() : 0);
                hash = (hash * hashingMultiplier) ^
                       (!ReferenceEquals(null, TeacherName) ? TeacherName.GetHashCode() : 0);
                hash = (hash * hashingMultiplier) ^
                       (!ReferenceEquals(null, ClassType) ? ClassType.GetHashCode() : 0);
                hash = (hash * hashingMultiplier) ^
                       (!ReferenceEquals(null, DayOfWeek) ? DayOfWeek.GetHashCode() : 0);
                hash = (hash * hashingMultiplier) ^
                       (!ReferenceEquals(null, TimeSegmentStart) ? TimeSegmentStart.GetHashCode() : 0);
                hash = (hash * hashingMultiplier) ^
                       (!ReferenceEquals(null, TimeSegmentCount) ? TimeSegmentCount.GetHashCode() : 0);

                return(hash);
            }
        }
예제 #3
0
 public override int GetHashCode()
 {
     return(23 ^ Name.GetHashCode() ^
            Slot.GetHashCode() ^
            PowerLevel.GetHashCode() ^
            Tier.GetHashCode() ^
            ClassType.GetHashCode());
 }
예제 #4
0
 public override int GetHashCode()
 {
     return(31 * ClassType.GetHashCode() + Field.GetHashCode());
 }
예제 #5
0
 public override int GetHashCode()
 {
     return(ClassType.GetHashCode() ^ RoutedEvent.GetHashCode());
 }