コード例 #1
0
        /// <summary>
        /// Returns true if PdfProtectParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of PdfProtectParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PdfProtectParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileId == input.FileId ||
                     (FileId != null &&
                      FileId.Equals(input.FileId))
                     ) &&
                 (
                     OwnerPassword == input.OwnerPassword ||
                     (OwnerPassword != null &&
                      OwnerPassword.Equals(input.OwnerPassword))
                 ) &&
                 (
                     UserPassword == input.UserPassword ||
                     (UserPassword != null &&
                      UserPassword.Equals(input.UserPassword))
                 ) &&
                 (
                     Encryption == input.Encryption ||
                     Encryption.Equals(input.Encryption)
                 ) &&
                 (
                     CanPrint == input.CanPrint ||
                     CanPrint.Equals(input.CanPrint)
                 ) &&
                 (
                     CanCopy == input.CanCopy ||
                     CanCopy.Equals(input.CanCopy)
                 ) &&
                 (
                     CanModify == input.CanModify ||
                     CanModify.Equals(input.CanModify)
                 ) &&
                 (
                     CanAddNotes == input.CanAddNotes ||
                     CanAddNotes.Equals(input.CanAddNotes)
                 ) &&
                 (
                     CanFillFields == input.CanFillFields ||
                     CanFillFields.Equals(input.CanFillFields)
                 ) &&
                 (
                     CanCopyAccess == input.CanCopyAccess ||
                     CanCopyAccess.Equals(input.CanCopyAccess)
                 ) &&
                 (
                     CanAssemble == input.CanAssemble ||
                     CanAssemble.Equals(input.CanAssemble)
                 ) &&
                 (
                     CanPrintFull == input.CanPrintFull ||
                     CanPrintFull.Equals(input.CanPrintFull)
                 ));
        }
コード例 #2
0
ファイル: Security.cs プロジェクト: wholesky/PDFCreator
        public override bool Equals(object o)
        {
            if (!(o is Security))
            {
                return(false);
            }
            Security v = o as Security;

            if (!AllowPrinting.Equals(v.AllowPrinting))
            {
                return(false);
            }
            if (!AllowScreenReader.Equals(v.AllowScreenReader))
            {
                return(false);
            }
            if (!AllowToCopyContent.Equals(v.AllowToCopyContent))
            {
                return(false);
            }
            if (!AllowToEditAssembly.Equals(v.AllowToEditAssembly))
            {
                return(false);
            }
            if (!AllowToEditComments.Equals(v.AllowToEditComments))
            {
                return(false);
            }
            if (!AllowToEditTheDocument.Equals(v.AllowToEditTheDocument))
            {
                return(false);
            }
            if (!AllowToFillForms.Equals(v.AllowToFillForms))
            {
                return(false);
            }
            if (!Enabled.Equals(v.Enabled))
            {
                return(false);
            }
            if (!EncryptionLevel.Equals(v.EncryptionLevel))
            {
                return(false);
            }
            if (!OwnerPassword.Equals(v.OwnerPassword))
            {
                return(false);
            }
            if (!RequireUserPassword.Equals(v.RequireUserPassword))
            {
                return(false);
            }
            if (!RestrictPrintingToLowQuality.Equals(v.RestrictPrintingToLowQuality))
            {
                return(false);
            }
            if (!UserPassword.Equals(v.UserPassword))
            {
                return(false);
            }
            return(true);
        }