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