コード例 #1
0
		public NewPSWorkflowExecutionOptionCommand()
		{
			this.option = new PSWorkflowExecutionOption();
		}
コード例 #2
0
 protected override void CopyUpdatedValuesFrom(PSSessionTypeOption updated)
 {
     if (updated != null)
     {
         PSWorkflowExecutionOption pSWorkflowExecutionOption = updated as PSWorkflowExecutionOption;
         if (pSWorkflowExecutionOption != null)
         {
             if (pSWorkflowExecutionOption.activityProcessIdleTimeoutSec != PSWorkflowConfigurationProvider.DefaultActivityProcessIdleTimeoutSec)
             {
                 this.activityProcessIdleTimeoutSec = pSWorkflowExecutionOption.activityProcessIdleTimeoutSec;
             }
             if (pSWorkflowExecutionOption.workflowApplicationPersistUnloadTimeoutSec != PSWorkflowConfigurationProvider.DefaultWorkflowApplicationPersistUnloadTimeoutSec)
             {
                 this.workflowApplicationPersistUnloadTimeoutSec = pSWorkflowExecutionOption.workflowApplicationPersistUnloadTimeoutSec;
             }
             if (!PSWorkflowExecutionOption.ListsMatch(pSWorkflowExecutionOption.allowedActivity, PSWorkflowConfigurationProvider.DefaultAllowedActivity))
             {
                 this.allowedActivity = pSWorkflowExecutionOption.allowedActivity;
             }
             if (!string.Equals(pSWorkflowExecutionOption.persistencePath, PSWorkflowConfigurationProvider.DefaultPersistencePath, StringComparison.OrdinalIgnoreCase))
             {
                 this.persistencePath = pSWorkflowExecutionOption.persistencePath;
             }
             if (pSWorkflowExecutionOption.maxPersistenceStoreSizeGB != PSWorkflowConfigurationProvider.DefaultMaxPersistenceStoreSizeGB)
             {
                 this.maxPersistenceStoreSizeGB = pSWorkflowExecutionOption.maxPersistenceStoreSizeGB;
             }
             if (pSWorkflowExecutionOption.persistWithEncryption != PSWorkflowConfigurationProvider.DefaultPersistWithEncryption)
             {
                 this.persistWithEncryption = pSWorkflowExecutionOption.persistWithEncryption;
             }
             if (pSWorkflowExecutionOption.remoteNodeSessionIdleTimeoutSec != PSWorkflowConfigurationProvider.DefaultRemoteNodeSessionIdleTimeoutSec)
             {
                 this.remoteNodeSessionIdleTimeoutSec = pSWorkflowExecutionOption.remoteNodeSessionIdleTimeoutSec;
             }
             if (pSWorkflowExecutionOption.maxActivityProcesses != PSWorkflowConfigurationProvider.DefaultMaxActivityProcesses)
             {
                 this.maxActivityProcesses = pSWorkflowExecutionOption.maxActivityProcesses;
             }
             if (pSWorkflowExecutionOption.maxConnectedSessions != PSWorkflowConfigurationProvider.DefaultMaxConnectedSessions)
             {
                 this.maxConnectedSessions = pSWorkflowExecutionOption.maxConnectedSessions;
             }
             if (pSWorkflowExecutionOption.maxDisconnectedSessions != PSWorkflowConfigurationProvider.DefaultMaxDisconnectedSessions)
             {
                 this.maxDisconnectedSessions = pSWorkflowExecutionOption.maxDisconnectedSessions;
             }
             if (pSWorkflowExecutionOption.maxRunningWorkflows != PSWorkflowConfigurationProvider.DefaultMaxRunningWorkflows)
             {
                 this.maxRunningWorkflows = pSWorkflowExecutionOption.maxRunningWorkflows;
             }
             if (pSWorkflowExecutionOption.maxSessionsPerRemoteNode != PSWorkflowConfigurationProvider.DefaultMaxSessionsPerRemoteNode)
             {
                 this.maxSessionsPerRemoteNode = pSWorkflowExecutionOption.maxSessionsPerRemoteNode;
             }
             if (pSWorkflowExecutionOption.maxSessionsPerWorkflow != PSWorkflowConfigurationProvider.DefaultMaxSessionsPerWorkflow)
             {
                 this.maxSessionsPerWorkflow = pSWorkflowExecutionOption.maxSessionsPerWorkflow;
             }
             if (!PSWorkflowExecutionOption.ListsMatch(pSWorkflowExecutionOption.outOfProcessActivity, PSWorkflowConfigurationProvider.DefaultOutOfProcessActivity))
             {
                 this.outOfProcessActivity = pSWorkflowExecutionOption.outOfProcessActivity;
             }
             if (pSWorkflowExecutionOption.enableValidation != PSWorkflowConfigurationProvider.DefaultEnableValidation)
             {
                 this.enableValidation = pSWorkflowExecutionOption.enableValidation;
             }
             if (pSWorkflowExecutionOption.sessionThrottleLimit != PSWorkflowConfigurationProvider.DefaultSessionThrottleLimit)
             {
                 this.sessionThrottleLimit = pSWorkflowExecutionOption.sessionThrottleLimit;
             }
             if (pSWorkflowExecutionOption.workflowShutdownTimeoutMSec != PSWorkflowConfigurationProvider.DefaultWorkflowShutdownTimeoutMSec)
             {
                 this.workflowShutdownTimeoutMSec = pSWorkflowExecutionOption.workflowShutdownTimeoutMSec;
             }
             return;
         }
         else
         {
             throw new ArgumentNullException("updated");
         }
     }
     else
     {
         throw new ArgumentNullException("updated");
     }
 }
コード例 #3
0
 public NewPSWorkflowExecutionOptionCommand()
 {
     this.option = new PSWorkflowExecutionOption();
 }
コード例 #4
0
        /// <summary>
        /// Copies values from updated.  Only non default values are copies.
        /// </summary>
        /// <param name="updated"></param>
        protected override void CopyUpdatedValuesFrom(PSSessionTypeOption updated)
        {
            if (updated == null)
            {
                throw new ArgumentNullException("updated");
            }

            PSWorkflowExecutionOption modified = updated as PSWorkflowExecutionOption;

            if (modified == null)
            {
                throw new ArgumentNullException("updated");
            }

            if (modified.activityProcessIdleTimeoutSec != PSWorkflowConfigurationProvider.DefaultActivityProcessIdleTimeoutSec)
            {
                this.activityProcessIdleTimeoutSec = modified.activityProcessIdleTimeoutSec;
            }

            if (modified.workflowApplicationPersistUnloadTimeoutSec != PSWorkflowConfigurationProvider.DefaultWorkflowApplicationPersistUnloadTimeoutSec)
            {
                this.workflowApplicationPersistUnloadTimeoutSec = modified.workflowApplicationPersistUnloadTimeoutSec;
            }

            if (modified.wsmanPluginReportCompletionOnZeroActiveSessionsWaitIntervalMSec != PSWorkflowConfigurationProvider.DefaultWSManPluginReportCompletionOnZeroActiveSessionsWaitIntervalMSec)
            {
                this.wsmanPluginReportCompletionOnZeroActiveSessionsWaitIntervalMSec = modified.wsmanPluginReportCompletionOnZeroActiveSessionsWaitIntervalMSec;
            }

            if (modified.activitiesCacheCleanupIntervalMSec != PSWorkflowConfigurationProvider.DefaultActivitiesCacheCleanupIntervalMSec)
            {
                this.activitiesCacheCleanupIntervalMSec = modified.activitiesCacheCleanupIntervalMSec;
            }

            if (!ListsMatch(modified.allowedActivity, PSWorkflowConfigurationProvider.DefaultAllowedActivity))
            {
                this.allowedActivity = modified.allowedActivity;
            }

            if (!string.Equals(modified.persistencePath, PSWorkflowConfigurationProvider.DefaultPersistencePath, StringComparison.OrdinalIgnoreCase))
            {
                this.persistencePath = modified.persistencePath;
            }

            if (modified.maxPersistenceStoreSizeGB != PSWorkflowConfigurationProvider.DefaultMaxPersistenceStoreSizeGB)
            {
                this.maxPersistenceStoreSizeGB = modified.maxPersistenceStoreSizeGB;
            }

            if (modified.persistWithEncryption != PSWorkflowConfigurationProvider.DefaultPersistWithEncryption)
            {
                this.persistWithEncryption = modified.persistWithEncryption;
            }

            if (modified.remoteNodeSessionIdleTimeoutSec != PSWorkflowConfigurationProvider.DefaultRemoteNodeSessionIdleTimeoutSec)
            {
                this.remoteNodeSessionIdleTimeoutSec = modified.remoteNodeSessionIdleTimeoutSec;
            }

            if (modified.maxActivityProcesses != PSWorkflowConfigurationProvider.DefaultMaxActivityProcesses)
            {
                this.maxActivityProcesses = modified.maxActivityProcesses;
            }

            if (modified.maxConnectedSessions != PSWorkflowConfigurationProvider.DefaultMaxConnectedSessions)
            {
                this.maxConnectedSessions = modified.maxConnectedSessions;
            }

            if (modified.maxDisconnectedSessions != PSWorkflowConfigurationProvider.DefaultMaxDisconnectedSessions)
            {
                this.maxDisconnectedSessions = modified.maxDisconnectedSessions;
            }

            if (modified.maxRunningWorkflows != PSWorkflowConfigurationProvider.DefaultMaxRunningWorkflows)
            {
                this.maxRunningWorkflows = modified.maxRunningWorkflows;
            }

            if (modified.maxSessionsPerRemoteNode != PSWorkflowConfigurationProvider.DefaultMaxSessionsPerRemoteNode)
            {
                this.maxSessionsPerRemoteNode = modified.maxSessionsPerRemoteNode;
            }

            if (modified.maxSessionsPerWorkflow != PSWorkflowConfigurationProvider.DefaultMaxSessionsPerWorkflow)
            {
                this.maxSessionsPerWorkflow = modified.maxSessionsPerWorkflow;
            }

            if (!ListsMatch(modified.outOfProcessActivity, PSWorkflowConfigurationProvider.DefaultOutOfProcessActivity))
            {
                this.outOfProcessActivity = modified.outOfProcessActivity;
            }

            if (modified.enableValidation != PSWorkflowConfigurationProvider.DefaultEnableValidation)
            {
                this.enableValidation = modified.enableValidation;
            }

            if (modified.sessionThrottleLimit != PSWorkflowConfigurationProvider.DefaultSessionThrottleLimit)
            {
                this.sessionThrottleLimit = modified.sessionThrottleLimit;
            }

            if (modified.workflowShutdownTimeoutMSec != PSWorkflowConfigurationProvider.DefaultWorkflowShutdownTimeoutMSec)
            {
                this.workflowShutdownTimeoutMSec = modified.workflowShutdownTimeoutMSec;
            }
        }