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