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

            if (Hours != 0)
            {
                hash ^= Hours.GetHashCode();
            }
            if (Minutes != 0)
            {
                hash ^= Minutes.GetHashCode();
            }
            if (Seconds != 0)
            {
                hash ^= Seconds.GetHashCode();
            }
            if (Nanos != 0)
            {
                hash ^= Nanos.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Hours.GetHashCode() * 10 + Minutes.GetHashCode() * 6) ^ Second.GetHashCode());
     }
 }
        // good practice to override this if overriding Equals
        public override int GetHashCode()
        {
            // return a hash (key) value for this object
            // object with same content should return same hash value

            return(Hours.GetHashCode() ^ Minutes.GetHashCode() ^ Minutes.GetHashCode());                 // simple hash
        }
Example #4
0
 public override int GetHashCode()
 {
     return
         (Hours.GetHashCode() ^
          Minutes.GetHashCode() ^
          Seconds.GetHashCode() ^
          Milliseconds.GetHashCode());
 }
Example #5
0
 /// <summary>
 /// Serves as the default hash function.
 /// </summary>
 /// <returns>A hash code for the current object.</returns>
 public override int GetHashCode()
 {
     return(base.GetHashCode() ^ Hours.GetHashCode() ^
            Minutes.GetHashCode() ^
            Seconds.GetHashCode() ^
            Frames.GetHashCode() ^
            SubFrames.GetHashCode());
 }
Example #6
0
        public override int GetHashCode()
        {
            var hashCode = -926758218;

            hashCode = hashCode * -1521134295 + Degrees.GetHashCode();
            hashCode = hashCode * -1521134295 + Minutes.GetHashCode();
            hashCode = hashCode * -1521134295 + Seconds.GetHashCode();
            return(hashCode);
        }
Example #7
0
        public override int GetHashCode()
        {
            var hashCode = -27068153;

            hashCode = hashCode * -1521134295 + Hours.GetHashCode();
            hashCode = hashCode * -1521134295 + Minutes.GetHashCode();
            hashCode = hashCode * -1521134295 + Seconds.GetHashCode();
            return(hashCode);
        }
Example #8
0
        public override int GetHashCode()
        {
            var hashCode = -99606436;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + Hours.GetHashCode();
            hashCode = hashCode * -1521134295 + Minutes.GetHashCode();
            hashCode = hashCode * -1521134295 + Seconds.GetHashCode();
            return(hashCode);
        }
Example #9
0
        public override int GetHashCode()
        {
            var hashCode = -1260144041;

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

            hashCode = hashCode * -1521134295 + Minutes.GetHashCode();
            hashCode = hashCode * -1521134295 + Seconds.GetHashCode();
            hashCode = hashCode * -1521134295 + Date.GetHashCode();
            return(hashCode);
        }
Example #10
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( )
        {
            int hash = 13;

            hash = (hash * 7) + Positive.GetHashCode( );
            hash = (hash * 7) + Hours.GetHashCode( );
            hash = (hash * 7) + Minutes.GetHashCode( );
            hash = (hash * 7) + Seconds.GetHashCode( );

            return(hash);
        }
Example #11
0
 /// <summary>
 /// Gets hash code for the angle value.
 /// </summary>
 /// <returns>Hash code value.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + Hours.GetHashCode();
         hash = hash * 23 + Minutes.GetHashCode();
         hash = hash * 23 + Seconds.GetHashCode();
         return(hash);
     }
 }
Example #12
0
        public override int GetHashCode()
        {
            var hashCode = 1266180088;

            hashCode = hashCode * -1521134295 + Hours.GetHashCode();
            hashCode = hashCode * -1521134295 + Minutes.GetHashCode();
            hashCode = hashCode * -1521134295 + Seconds.GetHashCode();
            hashCode = hashCode * -1521134295 + hours.GetHashCode();
            hashCode = hashCode * -1521134295 + minutes.GetHashCode();
            hashCode = hashCode * -1521134295 + seconds.GetHashCode();
            return(hashCode);
        }
Example #13
0
        public override int GetHashCode()
        {
            var hashCode = 1989793102;

            hashCode = hashCode * -1521134295 + Minutes.GetHashCode();
            hashCode = hashCode * -1521134295 + Seconds.GetHashCode();
            hashCode = hashCode * -1521134295 + Milliseconds.GetHashCode();
            hashCode = hashCode * -1521134295 + minutes.GetHashCode();
            hashCode = hashCode * -1521134295 + seconds.GetHashCode();
            hashCode = hashCode * -1521134295 + milliseconds.GetHashCode();
            return(hashCode);
        }
Example #14
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Seconds != null ? Seconds.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Minutes != null ? Minutes.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Hours != null ? Hours.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DaysOfMonth != null ? DaysOfMonth.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Months != null ? Months.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DaysOfWeek != null ? DaysOfWeek.GetHashCode() : 0);
         return(hashCode);
     }
 }
Example #15
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Years.GetHashCode();
         hashCode = (hashCode * 397) ^ Months.GetHashCode();
         hashCode = (hashCode * 397) ^ Weeks.GetHashCode();
         hashCode = (hashCode * 397) ^ Days.GetHashCode();
         hashCode = (hashCode * 397) ^ Hours.GetHashCode();
         hashCode = (hashCode * 397) ^ Minutes.GetHashCode();
         hashCode = (hashCode * 397) ^ Seconds.GetHashCode();
         hashCode = (hashCode * 397) ^ Milliseconds.GetHashCode();
         return(hashCode);
     }
 }
Example #16
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = Name != null?Name.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (Year != null ? Year.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Month != null ? Month.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Hours != null ? Hours.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Minutes != null ? Minutes.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (DayOfMonth != null ? DayOfMonth.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (DayOfWeek != null ? DayOfWeek.GetHashCode() : 0);
                return(hashCode);
            }
        }
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>A 32-bit signed integer that is the hash code for this instance.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = (int)2166136261;
         hash = (hash * 16777619) ^ Years.GetHashCode();
         hash = (hash * 16777619) ^ Months.GetHashCode();
         hash = (hash * 16777619) ^ Weeks.GetHashCode();
         hash = (hash * 16777619) ^ Days.GetHashCode();
         hash = (hash * 16777619) ^ Hours.GetHashCode();
         hash = (hash * 16777619) ^ Minutes.GetHashCode();
         hash = (hash * 16777619) ^ Seconds.GetHashCode();
         return(hash);
     }
 }
Example #18
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Year != 0)
            {
                hash ^= Year.GetHashCode();
            }
            if (Month != 0)
            {
                hash ^= Month.GetHashCode();
            }
            if (Day != 0)
            {
                hash ^= Day.GetHashCode();
            }
            if (Hours != 0)
            {
                hash ^= Hours.GetHashCode();
            }
            if (Minutes != 0)
            {
                hash ^= Minutes.GetHashCode();
            }
            if (Seconds != 0)
            {
                hash ^= Seconds.GetHashCode();
            }
            if (Nanos != 0)
            {
                hash ^= Nanos.GetHashCode();
            }
            if (timeOffsetCase_ == TimeOffsetOneofCase.UtcOffset)
            {
                hash ^= UtcOffset.GetHashCode();
            }
            if (timeOffsetCase_ == TimeOffsetOneofCase.TimeZone)
            {
                hash ^= TimeZone.GetHashCode();
            }
            hash ^= (int)timeOffsetCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #19
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 :)

                hashCode = hashCode * 59 + Years.GetHashCode();

                hashCode = hashCode * 59 + Months.GetHashCode();

                hashCode = hashCode * 59 + Days.GetHashCode();

                hashCode = hashCode * 59 + Hours.GetHashCode();

                hashCode = hashCode * 59 + Minutes.GetHashCode();

                hashCode = hashCode * 59 + Milliseconds.GetHashCode();

                hashCode = hashCode * 59 + TotalYears.GetHashCode();

                hashCode = hashCode * 59 + TotalMonths.GetHashCode();

                hashCode = hashCode * 59 + TotalDays.GetHashCode();

                hashCode = hashCode * 59 + TotalHours.GetHashCode();

                hashCode = hashCode * 59 + TotalMinutes.GetHashCode();

                hashCode = hashCode * 59 + TotalSeconds.GetHashCode();

                hashCode = hashCode * 59 + TotalMilliseconds.GetHashCode();

                hashCode = hashCode * 59 + Ticks.GetHashCode();
                return(hashCode);
            }
        }
Example #20
0
 public override int GetHashCode()
 {
     return(Credit.GetHashCode() ^ SMS.GetHashCode() ^ Minutes.GetHashCode() ^ Gigabytes.GetHashCode() ^ Number.GetHashCode());
 }
Example #21
0
 public override int GetHashCode()
 {
     return(FilePath.GetHashCode() * 37 + Minutes.GetHashCode());
 }
Example #22
0
 /// <summary>
 /// Przeciążenie metody GetHashCode, aby uniknąć kolizji hashcode'ów i wystąpienia fałszywej równości
 /// </summary>
 /// <returns>
 /// Możliwie różny hashcode od pierwotnego obiektu
 /// </returns>
 public override int GetHashCode()
 {
     return(Hours.GetHashCode() * 17 ^ (Minutes.GetHashCode() * Seconds.GetHashCode()));
 }