コード例 #1
0
ファイル: Shell.cs プロジェクト: dlsteuer/bounce
        public ProcessOutput Execute(string commandName, string commandArgs)
        {
            ICommandLog commandLog = Log.BeginExecutingCommand(commandName, commandArgs);

            string commandArgumentsForLogging = commandLog.CommandArgumentsForLogging;
            var    output = new CommandOutputReceiver(commandLog);

            Process p = CreateProcess(commandName, commandArgumentsForLogging, output);

            try
            {
                RunProcess(p);
            }
            catch (Win32Exception win32Ex)
            {
                if (win32Ex.NativeErrorCode == 2)
                { // executable file not found
                    throw new ShellExecutableNotFoundException(commandName);
                }
                throw;
            }

            commandLog.CommandComplete(p.ExitCode);

            return(new ProcessOutput
            {
                ExitCode = p.ExitCode,
                Output = output.Output,
                Error = output.Error,
                ErrorAndOutput = output.ErrorAndOutput
            });
        }
コード例 #2
0
ファイル: TeamCityNUnitLogger.cs プロジェクト: t3hc13h/bounce
        public void CommandComplete(int exitCode)
        {
            var resultsPath = Path.GetFullPath("TestResult.xml");

            Output.WriteLine(TeamCityFormatter.FormatTeamCityMessageWithFields("importData", "type", "nunit", "path", resultsPath));
            Log.CommandComplete(exitCode);
        }
コード例 #3
0
 public void CommandComplete(int exitCode)
 {
     Log.CommandComplete(exitCode);
 }