Execute() public method

public Execute ( ApplicationJob argument ) : void
argument ApplicationJob
return void
Ejemplo n.º 1
0
        /// <summary>
        /// Executes the command.
        /// </summary>
        /// <param name="targetFileName">Content for variable "{url:...}"</param>
        public virtual int Execute(ApplicationJob application, string targetFileName)
        {
            switch (Type)
            {
                case ScriptType.CS:
                    UserCSScript script = new UserCSScript(this.Text);
                    script.Execute(application);
                    break;

                default:
                    return ExecuteBatchCommand(application, this.Text, targetFileName);
            }

            return 0;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Executes the command.
        /// </summary>
        /// <param name="targetFileName">Content for variable "{url:...}"</param>
        public virtual int Execute(ApplicationJob application, string targetFileName)
        {
            switch (Type)
            {
            case ScriptType.CS:
                UserCSScript script = new UserCSScript(this.Text);
                script.Execute(application);
                break;

            default:
                return(ExecuteBatchCommand(application, this.Text, targetFileName));
            }

            return(0);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Executes the command.
        /// </summary>
        /// <param name="targetFileName">Content for variable "{url:...}"</param>
        public virtual int Execute(ApplicationJob application, string targetFileName = null, ApplicationJobError errorInfo = null)
        {
            switch (Type)
            {
            case ScriptType.CS:
                UserCSScript script = new UserCSScript(this.Text);
                script.Execute(application);
                break;

            case ScriptType.PowerShell:
                PowerShellScript psScript = new PowerShellScript(this.Text);
                psScript.Execute(application, errorInfo);
                return(Conversion.ToInt(psScript.LastOutput));

            default:
                return(ExecuteBatchCommand(application, this.Text, targetFileName));
            }

            return(0);
        }