/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns> /// A hash code for the current object. /// </returns> public override int GetHashCode() { // Create the hashcode lists. var hashCodes = new List <int> { ConnectionString.GetHashCode(), Table.GetHashCode() }; // Add the columns. hashCodes.AddRange(Columns.Select(c => c.GetHashCode())); // Add anything else. hashCodes.AddRange(GetStructuralHashCodes()); // Return the hash code. return(_hasher.GetHashCode(hashCodes)); }
public static int GetHashCode( this IHashAlgorithm hashAlgorithm, params int[] hashCodes ) => hashAlgorithm.GetHashCode((IEnumerable <int>)hashCodes);