Exemple #1
0
        public override CommandResult Do(IExecutionContext context)
        {
            string         absoluteProgramPath = context.GetStringFrom(ProgramExePath);
            ProcessWrapper proc   = new ProcessWrapper(absoluteProgramPath, Arguments, null, WindowType);
            int            result = proc.GetExitCode();

            if (IntResultName != null)
            {
                context.SaveResult(IntResultName, result);
            }
            if (StringResultName != null)
            {
                context.SaveResult(StringResultName, proc.StandardOutput);
            }
            if (StringErrorName != null)
            {
                context.SaveResult(StringErrorName, proc.StandardError);
            }
            return(CommandResult.Next);
        }