Exemple #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ClockId != 0)
            {
                hash ^= ClockId.GetHashCode();
            }
            if (Open != 0)
            {
                hash ^= Open.GetHashCode();
            }
            if (Hour != 0)
            {
                hash ^= Hour.GetHashCode();
            }
            if (Min != 0)
            {
                hash ^= Min.GetHashCode();
            }
            if (LabelId != 0)
            {
                hash ^= LabelId.GetHashCode();
            }
            return(hash);
        }
Exemple #2
0
 /// <summary>
 /// Return the HashCode of this object.
 /// </summary>
 /// <returns>The HashCode of this object.</returns>
 public override Int32 GetHashCode()
 {
     unchecked
     {
         return(Hour.GetHashCode() * 3 ^
                Minute.GetHashCode());
     }
 }
Exemple #3
0
        public override int GetHashCode()
        {
            var hashCode = 1505761165;

            hashCode = hashCode * -1521134295 + Hour.GetHashCode();
            hashCode = hashCode * -1521134295 + Minute.GetHashCode();
            hashCode = hashCode * -1521134295 + Second.GetHashCode();
            return(hashCode);
        }
Exemple #4
0
        public void Should_own_a_HashCode(double value)
        {
            var expected = value.GetHashCode();

            var instance = new Hour(value);
            var actual   = instance.GetHashCode();

            Assert.AreEqual(expected, actual);
        }
Exemple #5
0
 public override int GetHashCode()
 {
     return(Year.GetHashCode() * 13
            + Month.GetHashCode() * 3
            + Day.GetHashCode() * 13
            + Hour.GetHashCode() * 3
            + Minute.GetHashCode() * 3
            + Second.GetHashCode() * 7
            + MilliSeconds.GetHashCode() * 13);
 }
Exemple #6
0
 public override int GetHashCode() =>
 Second.GetHashCode() ^
 Minute.GetHashCode() ^
 Hour.GetHashCode() ^
 Day.GetHashCode() ^
 DayOfWeek.GetHashCode() ^
 Month.GetHashCode() ^
 Year.GetHashCode() ^
 DayOfYear.GetHashCode() ^
 IsDst.GetHashCode();
Exemple #7
0
        public override int GetHashCode()
        {
            var hash = Era.GetHashCode();

            hash = (hash * 23) + Year.GetHashCode();
            hash = (hash * 23) + Month.GetHashCode();
            hash = (hash * 23) + Day.GetHashCode();
            hash = (hash * 23) + Hour.GetHashCode();
            return(hash);
        }
Exemple #8
0
        /// <summary>
        /// HashCode calculé avec les propriétés de la classe mère, Hour, Min et Sec
        /// </summary>
        /// <returns>
        /// int : valeur du hashCode
        /// </returns>
        public override int GetHashCode()
        {
            var hashCode = 1227425067;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + Hour.GetHashCode();
            hashCode = hashCode * -1521134295 + Min.GetHashCode();
            hashCode = hashCode * -1521134295 + Second.GetHashCode();
            return(hashCode);
        }
Exemple #9
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 13;
         hash = (hash * 7) + Hour.GetHashCode();
         hash = (hash * 7) + Minute.GetHashCode();
         hash = (hash * 7) + Second.GetHashCode();
         return(hash);
     }
 }
Exemple #10
0
        public override int GetHashCode()
        {
            var hashCode = 980657963;

            hashCode = hashCode * -1521134295 + Day.GetHashCode();
            hashCode = hashCode * -1521134295 + _hour.GetHashCode();
            hashCode = hashCode * -1521134295 + Hour.GetHashCode();
            hashCode = hashCode * -1521134295 + _minute.GetHashCode();
            hashCode = hashCode * -1521134295 + Minute.GetHashCode();
            return(hashCode);
        }
        /**
         *<summary>
         * Calculates hash code for TimeHHMM
         *</summary>
         */
        public override int GetHashCode()
        {
            int hashSeed = "TimeHHMM".GetHashCode(); //Use class name as seed hash code
            int hashGain = hashSeed / 2;             //Use seed/2 as gain
            int hash;

            //Calculate hash code = seed + sum(code * gain + propertyHashCode)
            hash = hashSeed;
            hash = hash * hashGain + Hour.GetHashCode();
            hash = hash * hashGain + Minute.GetHashCode();

            return(hash);
        }
Exemple #12
0
        public override int GetHashCode()
        {
            const int k = 16777619;

            unchecked
            {
                int h = (int)2166136261;
                h = (h * k) ^ Year.GetHashCode();
                h = (h * k) ^ Month.GetHashCode();
                h = (h * k) ^ Day.GetHashCode();
                h = (h * k) ^ Hour.GetHashCode();
                h = (h * k) ^ Minute.GetHashCode();
                h = (h * k) ^ Second.GetHashCode();
                h = (h * k) ^ Millisecond.GetHashCode();
                h = (h * k) ^ IsSubstitued.GetHashCode();
                h = (h * k) ^ IsSummerTime.GetHashCode();
                return(h);
            }
        }
Exemple #13
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Hour != 0)
            {
                hash ^= Hour.GetHashCode();
            }
            if (Minute != 0)
            {
                hash ^= Minute.GetHashCode();
            }
            if (Second != 0)
            {
                hash ^= Second.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #14
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (ClockId != 0)
            {
                hash ^= ClockId.GetHashCode();
            }
            if (Hour != 0)
            {
                hash ^= Hour.GetHashCode();
            }
            if (Minute != 0)
            {
                hash ^= Minute.GetHashCode();
            }
            if (LabelId != 0)
            {
                hash ^= LabelId.GetHashCode();
            }
            if (SetTime != 0L)
            {
                hash ^= SetTime.GetHashCode();
            }
            if (OpenState != 0)
            {
                hash ^= OpenState.GetHashCode();
            }
            if (TipState != 0)
            {
                hash ^= TipState.GetHashCode();
            }
            return(hash);
        }
Exemple #15
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Year != 0)
            {
                hash ^= Year.GetHashCode();
            }
            if (Month != 0)
            {
                hash ^= Month.GetHashCode();
            }
            if (DayOfMonth != 0)
            {
                hash ^= DayOfMonth.GetHashCode();
            }
            if (DayOfWeek != 0)
            {
                hash ^= DayOfWeek.GetHashCode();
            }
            if (Hour != 0)
            {
                hash ^= Hour.GetHashCode();
            }
            if (Minute != 0)
            {
                hash ^= Minute.GetHashCode();
            }
            if (Second != 0)
            {
                hash ^= Second.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            var hashCode = 844321305;

            hashCode = hashCode * -1521134295 + Ticks.GetHashCode();
            hashCode = hashCode * -1521134295 + Second.GetHashCode();
            hashCode = hashCode * -1521134295 + Date.GetHashCode();
            hashCode = hashCode * -1521134295 + Month.GetHashCode();
            hashCode = hashCode * -1521134295 + Minute.GetHashCode();
            hashCode = hashCode * -1521134295 + Millisecond.GetHashCode();
            hashCode = hashCode * -1521134295 + Hour.GetHashCode();
            hashCode = hashCode * -1521134295 + DayOfYear.GetHashCode();
            hashCode = hashCode * -1521134295 + DayOfWeek.GetHashCode();
            hashCode = hashCode * -1521134295 + Day.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <TimeSpan> .Default.GetHashCode(TimeOfDay);

            hashCode = hashCode * -1521134295 + Year.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <TimeSpan> .Default.GetHashCode(Offset);

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

            return(hashCode);
        }
 /// <summary>
 /// Custom GetHashCode
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return((Day?.GetHashCode() ?? 0) ^ (Hour?.GetHashCode() ?? 0) ^ (Min?.GetHashCode() ?? 0) ^ Sec.GetHashCode());
 }
Exemple #18
0
 public override int GetHashCode()
 {
     return(Hour.GetHashCode() ^ Minute.GetHashCode() ^ Second.GetHashCode());
 }
 public override int GetHashCode()
 {
     return(Hour.GetHashCode() + Minute.GetHashCode());
 }
Exemple #20
0
 public override int GetHashCode()
 {
     return(Hour.GetHashCode() * 397 ^ Mintue.GetHashCode());
 }
Exemple #21
0
 /// <summary>
 /// Custom GetHashCode
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(Day.GetHashCode() ^ Hour.GetHashCode() ^ Min.GetHashCode());
 }