Beispiel #1
0
        public static Workflow GetInstance(WorkflowParameters wfp)
        {
            Workflow wf = null;

            wfp.CommandType = GetCommandType(wfp);

            switch (wfp.CommandType)
            {
            case ScriptType.Ant:
                wf = new AntWorkflow(wfp);
                break;

            case ScriptType.Powershell:
                wf = new PowershellWorkflow(wfp);
                break;

            case ScriptType.Plink:
                wf = new PlinkWorkflow(wfp);
                break;

            case ScriptType.Pscp:
                wf = new PscpWorkflow(wfp);
                break;

            default:
                wf = new Workflow(wfp);
                break;
            }

            return(wf);
        }
Beispiel #2
0
 public PowershellWorkflow(WorkflowParameters wfp)
     : base(wfp)
 {
 }
Beispiel #3
0
 public AntWorkflow(WorkflowParameters wfp)
     : base(wfp)
 {
 }
Beispiel #4
0
 public PlinkWorkflow(WorkflowParameters wfp)
     : base(wfp)
 {
 }
Beispiel #5
0
        protected static ScriptType GetCommandType(WorkflowParameters parms)
        {
            ScriptType sType            = ScriptType.None;
            bool       singleScriptType = true;

            // Determine ScriptType By ComplexType Elements In Workflow Parameters
            if (parms.Ant != null)
            {
                if (sType == ScriptType.None)
                {
                    sType = ScriptType.Ant;
                }
                else
                {
                    singleScriptType = false;
                }
            }

            if (parms.Powershell != null)
            {
                if (sType == ScriptType.None)
                {
                    sType = ScriptType.Powershell;
                }
                else
                {
                    singleScriptType = false;
                }
            }

            if (parms.Plink != null)
            {
                if (sType == ScriptType.None)
                {
                    sType = ScriptType.Plink;
                }
                else
                {
                    singleScriptType = false;
                }
            }

            if (parms.Pscp != null)
            {
                if (sType == ScriptType.None)
                {
                    sType = ScriptType.Pscp;
                }
                else
                {
                    singleScriptType = false;
                }
            }

            // Multiple ComplexType Elements Found, Unable To Determine Script Type
            if (singleScriptType == false)
            {
                sType = ScriptType.None;
            }

            return(sType);
        }
Beispiel #6
0
 protected Workflow(WorkflowParameters wfp)
 {
     _wfp = wfp;
 }
Beispiel #7
0
 public PscpWorkflow(WorkflowParameters wfp)
     : base(wfp)
 {
 }