コード例 #1
0
        /// <summary>
        /// Calculates the hash code for the object.
        /// </summary>
        /// <returns>Hash code for the object.</returns>
        private int CalculateHashCode()
        {
            int h;

            h = ShardKey.QPHash(this.Protocol.GetHashCode(), this.DataSource.ToUpperInvariant().GetHashCode());
            h = ShardKey.QPHash(h, this.Port.GetHashCode());
            h = ShardKey.QPHash(h, this.Database.ToUpperInvariant().GetHashCode());

            return(h);
        }
コード例 #2
0
 /// <summary>
 /// Calculates the hash code for the object.
 /// </summary>
 /// <returns>Hash code for the object.</returns>
 private int CalculateHashCode()
 {
     return(ShardKey.QPHash(this.Low.GetHashCode(), this.High.GetHashCode()));
 }