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