Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if ComAdobeCqSocialCalendarClientEndpointsImplCalendarOperationsIProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeCqSocialCalendarClientEndpointsImplCalendarOperationsIProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeCqSocialCalendarClientEndpointsImplCalendarOperationsIProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     MaxRetry == other.MaxRetry ||
                     MaxRetry != null &&
                     MaxRetry.Equals(other.MaxRetry)
                     ) &&
                 (
                     FieldWhitelist == other.FieldWhitelist ||
                     FieldWhitelist != null &&
                     FieldWhitelist.Equals(other.FieldWhitelist)
                 ) &&
                 (
                     AttachmentTypeBlacklist == other.AttachmentTypeBlacklist ||
                     AttachmentTypeBlacklist != null &&
                     AttachmentTypeBlacklist.Equals(other.AttachmentTypeBlacklist)
                 ));
        }
Ejemplo n.º 2
0
        public GenericNameValue ToArgs()
        {
            GenericNameValue prop = new GenericNameValue();

            prop["ServerPath"]    = ServerPath;
            prop["QueueName"]     = QueueName;
            prop["Mode"]          = ((int)Mode).ToString();
            prop["IsTrans"]       = IsTrans.ToString();
            prop["MaxRetry"]      = MaxRetry.ToString();
            prop["ReloadOnStart"] = ReloadOnStart.ToString();
            return(prop);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// login on wf service user profile
        /// must install gs910w64 on server
        ///  http://www.ghostscript.com/download/gsdnld.html or sharedDlls
        /// </summary>
        /// <param name="executionContext"></param>
        protected override void Execute(CodeActivityContext executionContext)
        {
            ITracingService             tracingService = executionContext.GetExtension <ITracingService>();
            IWorkflowContext            context        = executionContext.GetExtension <IWorkflowContext>();
            IOrganizationServiceFactory serviceFactory = executionContext.GetExtension <IOrganizationServiceFactory>();
            IOrganizationService        service        = serviceFactory.CreateOrganizationService(context.UserId);

            var entityid = (Guid)context.InputParameters["EntityId"];

            TaskDocumentsPrinter logic = new TaskDocumentsPrinter(service);
            var data = logic.GetPdfFromTask(entityid);

            if (!data.Any())
            {
                return;
            }

            var       pathRoot        = PathToSave.Get(executionContext);
            var       goustScriptPath = GoustScriptPath.Get(executionContext);
            var       printer         = PrinterName.Get(executionContext);
            var       maxRetry        = MaxRetry.Get(executionContext);
            var       path            = "";
            FileUtils fileUtil        = new FileUtils();

            try
            {
                foreach (var fileAndData in data)
                {
                    path = fileUtil.CopyToTemp(pathRoot, fileAndData);
                    UtilPrinters.Print(new Settings
                    {
                        GoustScriptPath = goustScriptPath,
                        printerName     = printer,
                        MaxRetry        = maxRetry,
                        WaitingRetry    = 1000
                    }, path, Log);
                }
            }
            catch (System.Exception e)
            {
                throw new InvalidWorkflowException(e.ToString());
            }
        }
Ejemplo n.º 4
0
 /// <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 (MaxRetry != null)
         {
             hashCode = hashCode * 59 + MaxRetry.GetHashCode();
         }
         if (FieldWhitelist != null)
         {
             hashCode = hashCode * 59 + FieldWhitelist.GetHashCode();
         }
         if (AttachmentTypeBlacklist != null)
         {
             hashCode = hashCode * 59 + AttachmentTypeBlacklist.GetHashCode();
         }
         return(hashCode);
     }
 }