/// <summary> /// Returns true if PushEvent instances are equal /// </summary> /// <param name="other">Instance of PushEvent to be compared</param> /// <returns>Boolean</returns> public bool Equals(PushEvent other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( PusherId == other.PusherId || PusherId.Equals(other.PusherId) ) && ( Ammount == other.Ammount || Ammount.Equals(other.Ammount) ) && ( PushDirecton == other.PushDirecton || PushDirecton.Equals(other.PushDirecton) ) && ( PushedId == other.PushedId || PushedId.Equals(other.PushedId) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; // Suitable nullity checks etc, of course :) hashCode = hashCode * 59 + PusherId.GetHashCode(); hashCode = hashCode * 59 + Ammount.GetHashCode(); hashCode = hashCode * 59 + PushDirecton.GetHashCode(); hashCode = hashCode * 59 + PushedId.GetHashCode(); return(hashCode); } }