/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns> public override int GetHashCode() { unchecked { var hashCode = AuditDate.GetHashCode(); hashCode = (hashCode * 397) ^ CasinoName.GetHashCode(); hashCode = (hashCode * 397) ^ EgmSerialNumber.GetHashCode(); hashCode = (hashCode * 397) ^ EgmAssetNumber.GetHashCode(); hashCode = (hashCode * 397) ^ GameTheme.GetHashCode(); hashCode = (hashCode * 397) ^ Denomination.GetHashCode(); return(hashCode); } }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <param name="other">An object to compare with this object.</param> /// <returns>true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false.</returns> public bool Equals(EgmCompositeKey other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(AuditDate.Equals(other.AuditDate) && string.Equals(CasinoName, other.CasinoName) && string.Equals(EgmSerialNumber, other.EgmSerialNumber) && string.Equals(EgmAssetNumber, other.EgmAssetNumber) && string.Equals(GameTheme, other.GameTheme) && Denomination == other.Denomination); }