private void initCurl(string url) { easy = new CurlEasy(); easy.Url = url; easy.Timeout = TimeOut; easy.ConnectTimeout = TimeOut; easy.BufferSize = BLOCK_SIZE; if ((!UserName.Equals("")) && (!UserPassword.Equals(""))) { easy.SetOpt(CurlOption.UserPwd, UserName + ":" + UserPassword); } // easy.fun easy.DebugFunction = OnDebug; easy.ProgressFunction = onProgress; easy.UserAgent = "curl"; easy.Verbose = true; // HTTP/2 please // easy.HttpVersion = CurlHttpVersion.Http2_0; // skip SSL verification during debugging easy.SslVerifyPeer = false; easy.SslVerifyhost = false; easy.SetOpt(CurlOption.HttpHeader, "Content-Type: application/octet-stream"); easy.SetOpt(CurlOption.HttpHeader, "Expect:"); }
/// <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) )); }