/// <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 (ActionType != null) { hashCode = hashCode * 59 + ActionType.GetHashCode(); } if (FormFields != null) { hashCode = hashCode * 59 + FormFields.GetHashCode(); } if (RedirectData != null) { hashCode = hashCode * 59 + RedirectData.GetHashCode(); } if (RenderingData != null) { hashCode = hashCode * 59 + RenderingData.GetHashCode(); } if (ShowData != null) { hashCode = hashCode * 59 + ShowData.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if MerchantAction instances are equal /// </summary> /// <param name="other">Instance of MerchantAction to be compared</param> /// <returns>Boolean</returns> public bool Equals(MerchantAction other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( ActionType == other.ActionType || ActionType != null && ActionType.Equals(other.ActionType) ) && ( FormFields == other.FormFields || FormFields != null && FormFields.SequenceEqual(other.FormFields) ) && ( RedirectData == other.RedirectData || RedirectData != null && RedirectData.Equals(other.RedirectData) ) && ( RenderingData == other.RenderingData || RenderingData != null && RenderingData.Equals(other.RenderingData) ) && ( ShowData == other.ShowData || ShowData != null && ShowData.SequenceEqual(other.ShowData) )); }