Beispiel #1
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);
        }
Beispiel #2
0
        public void Should_own_a_HashCode(double value)
        {
            var expected = value.GetHashCode();

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

            Assert.AreEqual(expected, actual);
        }
Beispiel #3
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);
 }
        public override int GetHashCode()
        {
            var hashCode = 1964249198;

            hashCode = hashCode * -1521134295 + Degree.GetHashCode();
            hashCode = hashCode * -1521134295 + Minute.GetHashCode();
            hashCode = hashCode * -1521134295 + Second.GetHashCode();
            hashCode = hashCode * -1521134295 + Compass.GetHashCode();
            return(hashCode);
        }
Beispiel #5
0
 public override int GetHashCode() =>
 Second.GetHashCode() ^
 Minute.GetHashCode() ^
 Hour.GetHashCode() ^
 Day.GetHashCode() ^
 DayOfWeek.GetHashCode() ^
 Month.GetHashCode() ^
 Year.GetHashCode() ^
 DayOfYear.GetHashCode() ^
 IsDst.GetHashCode();
Beispiel #6
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);
     }
 }
Beispiel #7
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);
            }
        }
Beispiel #8
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
     {
         int hashCode = (int)Options;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CalendarSystem.GetHashCode();
         hashCode = (hashCode * 397) ^ DateTimeZone.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Day;
         hashCode = (hashCode * 397) ^ (int)FirstDayOfWeek;
         hashCode = (hashCode * 397) ^ (int)Hour;
         hashCode = (hashCode * 397) ^ MinimumGap.GetHashCode();
         hashCode = (hashCode * 397) ^ Minute.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Month;
         hashCode = (hashCode * 397) ^ Second.GetHashCode();
         hashCode = (hashCode * 397) ^ Week.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)WeekDay;
         return(hashCode);
     }
 }
Beispiel #9
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);
        }
Beispiel #10
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);
        }
Beispiel #11
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);
        }
        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);
        }
Beispiel #13
0
 public override int GetHashCode()
 {
     return(Hour.GetHashCode() ^ Minute.GetHashCode() ^ Second.GetHashCode());
 }
Beispiel #14
0
 public override int GetHashCode()
 {
     unchecked {
         return((Minute.GetHashCode() * 397) ^ (Name?.GetHashCode() ?? 0));
     }
 }