コード例 #1
0
    public override int GetHashCode()
    {
        int x = DbName == null ? 0 : DbName.GetHashCode();
        int y = ObjectName == null ? 0 : ObjectName.GetHashCode();

        return((-1423 * x) ^ y);
    }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((DbName != null ? DbName.GetHashCode() : 0) * 397) ^
                (Server != null ? Server.GetHashCode() : 0));
     }
 }
コード例 #3
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ServerName?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (int)Type;
         hashCode = (hashCode * 397) ^ (UserName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Password?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)AuthenticationType;
         hashCode = (hashCode * 397) ^ (DbName?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }