ProcessResult.cs :  » Build-Systems » CruiseControl.NET » ThoughtWorks » CruiseControl » Core » Util » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Build Systems » CruiseControl.NET 
CruiseControl.NET » ThoughtWorks » CruiseControl » Core » Util » ProcessResult.cs

namespace ThoughtWorks.CruiseControl.Core.Util{
  /// <summary>
  /// ProcessResult holds the results of a Process' execution.  This class is returned from the ProcessExecutor
  /// once the Process has finished executing (teriminating either normally or abnormally).  
  /// ProcessResult indicates if the process executed successfully or if it timed out.
  /// It also indicates what the process wrote to its standard output and error streams.
  /// </summary>
  public class ProcessResult
  {
    public const int SUCCESSFUL_EXIT_CODE = 0;
    public const int TIMED_OUT_EXIT_CODE = -1;

    private readonly string standardOutput;
    private readonly string standardError;
    private readonly int errorCode;
    private readonly bool timedOut;
    private readonly bool failed;

    public ProcessResult(string standardOutput, string standardError, int errorCode, bool timedOut)
      : this(standardOutput, standardError, errorCode, timedOut, errorCode != SUCCESSFUL_EXIT_CODE)
    {
    }

    public ProcessResult(string standardOutput, string standardError, int errorCode, bool timedOut, bool failed)
    {
      this.standardOutput = (standardOutput ??string.Empty);
      this.standardError = (standardError ??string.Empty);
      this.errorCode = errorCode;
      this.timedOut = timedOut;
      this.failed = failed;
    }

    public string StandardOutput
    {
      get { return standardOutput; }
    }

    public string StandardError
    {
      get { return standardError; }
    }

    public int ExitCode
    {
      get { return errorCode; }
    }

    public bool TimedOut
    {
      get { return timedOut; }
    }

    public bool Failed
    {
      get { return failed; }  
    }

    public bool HasErrorOutput
    {
      get { return standardError.Trim() != string.Empty; }
    }
  }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.