Ejemplo n.º 1
0
        /// <summary>
        /// Update contact info, returns false if Value Objects are equal.
        /// </summary>
        /// <param name="newInfo"></param>
        /// <param name="modifiedBy"></param>
        /// <returns></returns>
        public Result UpdateContactInfo(ContactInfo newInfo, Guid modifiedBy)
        {
            if (ContactInfo.Equals(newInfo))
            {
                return(Result.Fail("Contact info is identical"));
            }

            ContactInfo = newInfo;

            return(Result.Ok());
        }
Ejemplo n.º 2
0
        /// <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))
                 ));
        }