コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = OldLocalRateLimit.GetHashCode();
         hashCode = (hashCode * 397) ^ NewLocalRateLimit.GetHashCode();
         hashCode = (hashCode * 397) ^ OldGlobalRateLimit.GetHashCode();
         hashCode = (hashCode * 397) ^ NewGlobalRateLimit.GetHashCode();
         return(hashCode);
     }
 }
コード例 #2
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = EqualityComparer <TK> .Default.GetHashCode(Key);

                hashCode = (hashCode * 397) ^ OldLocalRateLimit.GetHashCode();
                hashCode = (hashCode * 397) ^ NewLocalRateLimit.GetHashCode();
                hashCode = (hashCode * 397) ^ OldGlobalRateLimit.GetHashCode();
                hashCode = (hashCode * 397) ^ NewGlobalRateLimit.GetHashCode();
                return(hashCode);
            }
        }
コード例 #3
0
        public bool Equals(RateLimitChangedNotification other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                (OldLocalRateLimit.Equals(other.OldLocalRateLimit) &&
                 NewLocalRateLimit.Equals(other.NewLocalRateLimit) &&
                 OldGlobalRateLimit.Equals(other.OldGlobalRateLimit) &&
                 NewGlobalRateLimit.Equals(other.NewGlobalRateLimit));
        }
コード例 #4
0
        public bool Equals(RateLimitChangedNotification <TK> other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                (EqualityComparer <TK> .Default.Equals(Key, other.Key) &&
                 OldLocalRateLimit.Equals(other.OldLocalRateLimit) &&
                 NewLocalRateLimit.Equals(other.NewLocalRateLimit) &&
                 OldGlobalRateLimit.Equals(other.OldGlobalRateLimit) &&
                 NewGlobalRateLimit.Equals(other.NewGlobalRateLimit));
        }