/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Alias != null) { hashCode = hashCode * 59 + Alias.GetHashCode(); } if (EntryType != null) { hashCode = hashCode * 59 + EntryType.GetHashCode(); } if (Algorithm != null) { hashCode = hashCode * 59 + Algorithm.GetHashCode(); } if (Format != null) { hashCode = hashCode * 59 + Format.GetHashCode(); } if (Chain != null) { hashCode = hashCode * 59 + Chain.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { var hashCode = 1707150943; hashCode = hashCode * -1521134295 + EntryType.GetHashCode(); hashCode = hashCode * -1521134295 + StringComparer.Ordinal.GetHashCode(Pattern); hashCode = hashCode * -1521134295 + StringComparer.Ordinal.GetHashCode(Member); return(hashCode); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Alias != null) { hashCode = hashCode * 59 + Alias.GetHashCode(); } if (EntryType != null) { hashCode = hashCode * 59 + EntryType.GetHashCode(); } if (Subject != null) { hashCode = hashCode * 59 + Subject.GetHashCode(); } if (Issuer != null) { hashCode = hashCode * 59 + Issuer.GetHashCode(); } if (NotBefore != null) { hashCode = hashCode * 59 + NotBefore.GetHashCode(); } if (NotAfter != null) { hashCode = hashCode * 59 + NotAfter.GetHashCode(); } if (SerialNumber != null) { hashCode = hashCode * 59 + SerialNumber.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { return(Index.GetHashCode() ^ EntryType.GetHashCode() ^ Item.GetHashCode()); }
private void InsertIDtoDatabase(Service listservice, int malid, int servicetitleid, EntryType type) { String sql = ""; int mediatype = type == EntryType.Anime ? 0 : 1; switch (listservice) { case Service.AniList: sql = "INSERT INTO titleids (malid,anilist_id,mediatype) VALUES (" + malid.ToString() + "," + servicetitleid.ToString() + "," + type.GetHashCode() + ")"; break; case Service.Kitsu: sql = "INSERT INTO titleids (malid,kitsu_id,mediatype) VALUES (" + malid.ToString() + "," + servicetitleid.ToString() + "," + type.GetHashCode() + ")"; break; default: return; } SQLiteCommand cmd = new SQLiteCommand(sql, sqlitecon); cmd.ExecuteNonQuery(); }