/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (FileId != null) { hashCode = hashCode * 59 + FileId.GetHashCode(); } if (CertificateData != null) { hashCode = hashCode * 59 + CertificateData.GetHashCode(); } if (CertificatePassword != null) { hashCode = hashCode * 59 + CertificatePassword.GetHashCode(); } hashCode = hashCode * 59 + SignatureMode.GetHashCode(); hashCode = hashCode * 59 + SignatureCertificationLevel.GetHashCode(); hashCode = hashCode * 59 + SignatureHashAlgorithm.GetHashCode(); if (SignerName != null) { hashCode = hashCode * 59 + SignerName.GetHashCode(); } if (Reason != null) { hashCode = hashCode * 59 + Reason.GetHashCode(); } if (Location != null) { hashCode = hashCode * 59 + Location.GetHashCode(); } if (ContactInfo != null) { hashCode = hashCode * 59 + ContactInfo.GetHashCode(); } if (TimeStampURL != null) { hashCode = hashCode * 59 + TimeStampURL.GetHashCode(); } if (TimeStampUserName != null) { hashCode = hashCode * 59 + TimeStampUserName.GetHashCode(); } if (TimeStampPassword != null) { hashCode = hashCode * 59 + TimeStampPassword.GetHashCode(); } hashCode = hashCode * 59 + Linearize.GetHashCode(); hashCode = hashCode * 59 + DrawSignature.GetHashCode(); hashCode = hashCode * 59 + PageNumber.GetHashCode(); hashCode = hashCode * 59 + ShowValidationMark.GetHashCode(); if (ImageData != null) { hashCode = hashCode * 59 + ImageData.GetHashCode(); } if (SignatureLayout != null) { hashCode = hashCode * 59 + SignatureLayout.GetHashCode(); } if (SignatureText != null) { hashCode = hashCode * 59 + SignatureText.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if PdfDigiSignParameters instances are equal /// </summary> /// <param name="input">Instance of PdfDigiSignParameters to be compared</param> /// <returns>Boolean</returns> public bool Equals(PdfDigiSignParameters input) { if (input == null) { return(false); } return (( FileId == input.FileId || (FileId != null && FileId.Equals(input.FileId)) ) && ( CertificateData == input.CertificateData || (CertificateData != null && CertificateData.Equals(input.CertificateData)) ) && ( CertificatePassword == input.CertificatePassword || (CertificatePassword != null && CertificatePassword.Equals(input.CertificatePassword)) ) && ( SignatureMode == input.SignatureMode || SignatureMode.Equals(input.SignatureMode) ) && ( SignatureCertificationLevel == input.SignatureCertificationLevel || SignatureCertificationLevel.Equals(input.SignatureCertificationLevel) ) && ( SignatureHashAlgorithm == input.SignatureHashAlgorithm || SignatureHashAlgorithm.Equals(input.SignatureHashAlgorithm) ) && ( SignerName == input.SignerName || (SignerName != null && SignerName.Equals(input.SignerName)) ) && ( Reason == input.Reason || (Reason != null && Reason.Equals(input.Reason)) ) && ( Location == input.Location || (Location != null && Location.Equals(input.Location)) ) && ( ContactInfo == input.ContactInfo || (ContactInfo != null && ContactInfo.Equals(input.ContactInfo)) ) && ( TimeStampURL == input.TimeStampURL || (TimeStampURL != null && TimeStampURL.Equals(input.TimeStampURL)) ) && ( TimeStampUserName == input.TimeStampUserName || (TimeStampUserName != null && TimeStampUserName.Equals(input.TimeStampUserName)) ) && ( TimeStampPassword == input.TimeStampPassword || (TimeStampPassword != null && TimeStampPassword.Equals(input.TimeStampPassword)) ) && ( Linearize == input.Linearize || Linearize.Equals(input.Linearize) ) && ( DrawSignature == input.DrawSignature || DrawSignature.Equals(input.DrawSignature) ) && ( PageNumber == input.PageNumber || PageNumber.Equals(input.PageNumber) ) && ( ShowValidationMark == input.ShowValidationMark || ShowValidationMark.Equals(input.ShowValidationMark) ) && ( ImageData == input.ImageData || (ImageData != null && ImageData.Equals(input.ImageData)) ) && ( SignatureLayout == input.SignatureLayout || (SignatureLayout != null && SignatureLayout.Equals(input.SignatureLayout)) ) && ( SignatureText == input.SignatureText || (SignatureText != null && SignatureText.Equals(input.SignatureText)) )); }