Otter SDK Reference
Version:

LocalProcess Class

Represents a process running locally.

Inheritance Hierarchy

  • object
    • Inedo.Agents.LocalProcess

Syntax

public class LocalProcess : IRemoteProcess, System.IDisposable

Constructors

Name Description
LocalProcess(RemoteProcessStartInfo startInfo)

Initializes a new instance of the LocalProcess class.

Events

Name Description
ErrorDataReceived

Occurs when error data has been received.

Exited

Occurs when the process has exited.

OutputDataReceived

Occurs when output data has been received.

Properties

Name Description
ExitCode

Gets the process exit code.

OutputFileName

Gets the name of the file to write process output to.

Methods

Name Description
Dispose

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Start

Starts the process.

Terminate

Immediately terminates the process.

Wait(System.Threading.CancellationToken cancellationToken)

Waits until the process has exited.

WaitAsync(System.Threading.CancellationToken cancellationToken)

Asynchronously waits until the process has exited.

Remarks

This provides the same functionality as System.Diagnostics.Process, except for the following:

  • Exited is only raised when the process has exited and all output has been read.

  • The System.Threading.Tasks.Task property allows the process to be awaited.

  • Process output may be redirected to a file instead of captured.