Esempio n. 1
0
        /// <summary>
        /// Serves as the default hash function.
        /// </summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            var hashCode = 543595584;

            hashCode = (hashCode * -1521134295) + TotalCount.GetHashCode();
            hashCode = (hashCode * -1521134295) + TotalCountChange.GetHashCode();
            hashCode = (hashCode * -1521134295) + CurrentCount.GetHashCode();
            hashCode = (hashCode * -1521134295) + CurrentCountChange.GetHashCode();
            hashCode = (hashCode * -1521134295) + EqualityComparer <InstanceHandle> .Default.GetHashCode(LastSubscriptionHandle);

            return(hashCode);
        }
Esempio n. 2
0
        /// <summary>
        /// Serves as the default hash function.
        /// </summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            var hashCode = 751819449;

            hashCode = (hashCode * -1521134295) + TotalCount.GetHashCode();
            hashCode = (hashCode * -1521134295) + TotalCountChange.GetHashCode();
            hashCode = (hashCode * -1521134295) + LastPolicyId.GetHashCode();

            foreach (var p in Policies)
            {
                hashCode = (hashCode * -1521134295) + p.GetHashCode();
            }

            return(hashCode);
        }