Esempio n. 1
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()
        {
            var hash = Positive.GetHashCode();

            hash = (hash * 13) ^ Negative.GetHashCode();
            hash = (hash * 13) ^ PosPrime.GetHashCode();
            return(hash);
        }
Esempio n. 2
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()
        {
            var hash = Drain.GetHashCode();

            hash = (hash * 13) ^ DrainPrime.GetHashCode();
            hash = (hash * 13) ^ Source.GetHashCode();
            hash = (hash * 13) ^ SourcePrime.GetHashCode();
            hash = (hash * 13) ^ Gate.GetHashCode();
            hash = (hash * 13) ^ Bulk.GetHashCode();
            return(hash);
        }
Esempio n. 3
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() => (Positive.GetHashCode() * 13) ^ Negative.GetHashCode();