private void AddCustomObjects()
        {
            foreach (string item in this.CustomStacks)
            {
                PlanAction planAction = new PlanAction(
                    this.PlanActions.Max(pa => pa.Order) + 1,
                    STACK_PLAN_ACTION_NAME_VALUE);
                planAction.AddParameter(STACK_PARAMETER_NAME_VALUE, item);

                this.PlanActions.Add(planAction);
            }
            foreach (string item in this.CustomScans)
            {
                PlanAction planAction = new PlanAction(
                    this.PlanActions.Max(pa => pa.Order) + 1,
                    DISCOVERY_ACTION_NAME_VALUE);
                planAction.AddParameter(DISCOVERY_PARAMETER_NAME_VALUE, item);

                this.PlanActions.Add(planAction);
            }
            foreach (ActionParameter item in this.Workflows)
            {
                PlanAction planAction = new PlanAction(
                    this.PlanActions.Max(pa => pa.Order) + 1,
                    WORKFLOW_ACTION_NAME_VALUE);
                planAction.Parameters.Add(item);

                this.PlanActions.Add(planAction);
            }
        }
        public static int OrderComparison(PlanAction x, PlanAction y)
        {
            if (x == null || y == null)
            {
                return(0);
            }

            return(x.Order.CompareTo(y.Order));
        }
 private void AddApplicationStacks()
 {
     foreach (Stack item in this.ApplicationStacks)
     {
         PlanAction planAction = new PlanAction(this.PlanActions.Max(pa => pa.Order) + 1, STACK_PLAN_ACTION_NAME_VALUE);
         planAction.AddParameter(STACK_PARAMETER_NAME_VALUE, item.Code);
         this.PlanActions.Add(planAction);
     }
 }
 private void AddPlatformStack()
 {
     if (!this.PlatformStack.StackLookup.IsDefault)
     {
         PlanAction planAction = new PlanAction(this.PlanActions.Max(pa => pa.Order) + 1, STACK_PLAN_ACTION_NAME_VALUE);
         planAction.AddParameter(STACK_PARAMETER_NAME_VALUE, this.PlatformStack.StackLookup.Code);
         this.PlanActions.Add(planAction);
     }
 }
        private void AddFinalWorkflows()
        {
            foreach (PlanActionLookup item in this.FinalWorkflows)
            {
                PlanAction planAction = new PlanAction(
                    (item.RunOrder.HasValue) ? Convert.ToInt32(item.RunOrder.Value) : this.PlanActions.Max(pa => pa.Order) + 1,
                    WORKFLOW_ACTION_NAME_VALUE);
                planAction.AddParameter(WORKFLOW_NAME_PARAMETER_NAME_VALUE, item.Code);

                this.PlanActions.Add(planAction);
            }
        }
        private void AddCommonPlanActions()
        {
            foreach (PlanActionLookup item in this.CommonPlanActions)
            {
                PlanAction planAction = new PlanAction(
                    (item.RunOrder.HasValue) ? Convert.ToInt32(item.RunOrder.Value) : this.PlanActions.Max(pa => pa.Order) + 1,
                    DISCOVERY_ACTION_NAME_VALUE);
                planAction.AddParameter(DISCOVERY_PARAMETER_NAME_VALUE, item.Code);

                this.PlanActions.Add(planAction);
            }
        }
        public object Clone()
        {
            PlanAction result = new PlanAction();

            result.Order           = this.Order;
            result.Name            = (string)this.Name.Clone();
            result.ContinueOnError = (string)this.ContinueOnError.Clone();
            result.MaxRetries      = this.MaxRetries;
            foreach (ActionParameter item in this.Parameters)
            {
                result.Parameters.Add((ActionParameter)item.Clone());
            }
            return(result);
        }