/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); if (OldTable != null) { hash = hash * 59 + OldTable.GetHashCode(); } if (NewTable != null) { hash = hash * 59 + NewTable.GetHashCode(); } if (OldKey != null) { hash = hash * 59 + OldKey.GetHashCode(); } hash = hash * 59 + NewKey.GetHashCode(); return(hash); } }
internal void ClearSqlMeta() { OldTable.Clear(); OldTable.AddRange(Table); Table.Clear(); OldStoredProcedure.Clear(); OldStoredProcedure.AddRange(StoredProcedure); StoredProcedure.Clear(); OldTableType.Clear(); OldTableType.AddRange(TableType); TableType.Clear(); Query.Clear(); MockView.Clear(); View.Clear(); }
/// <summary> /// Returns true if ImportMap instances are equal /// </summary> /// <param name="other">Instance of ImportMap to be compared</param> /// <returns>Boolean</returns> public bool Equals(ImportMap other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id.Equals(other.Id) ) && ( OldTable == other.OldTable || OldTable != null && OldTable.Equals(other.OldTable) ) && ( NewTable == other.NewTable || NewTable != null && NewTable.Equals(other.NewTable) ) && ( OldKey == other.OldKey || OldKey != null && OldKey.Equals(other.OldKey) ) && ( NewKey == other.NewKey || NewKey.Equals(other.NewKey) )); }