Interface IProcessRunner
Interface for running external processes synchronously.
Namespace: Benday.Common
Assembly: Benday.Common.dll
Syntax
public interface IProcessRunner
Properties
| Edit this page View SourceErrorText
The error text from the process.
Declaration
string ErrorText { get; }
Property Value
| Type | Description |
|---|---|
| string |
HasCompleted
Indicates if the process has completed.
Declaration
bool HasCompleted { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsError
Indicates if the process completed with an error.
Declaration
bool IsError { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsSuccess
Indicates if the process completed successfully.
Declaration
bool IsSuccess { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsTimeout
Indicates if the process timed out.
Declaration
bool IsTimeout { get; }
Property Value
| Type | Description |
|---|---|
| bool |
OutputText
The output text from the process.
Declaration
string OutputText { get; }
Property Value
| Type | Description |
|---|---|
| string |
StartInfo
The ProcessStartInfo object used to configure the process.
Declaration
ProcessStartInfo StartInfo { get; }
Property Value
| Type | Description |
|---|---|
| ProcessStartInfo |
Timeout
The timeout in milliseconds for the process to run.
Declaration
int Timeout { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceRun()
Run the process synchronously and wait for completion.
Declaration
IProcessRunnerResult Run()
Returns
| Type | Description |
|---|---|
| IProcessRunnerResult | The result of the process execution. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown if Run() is called more than once. |
| TimeoutException | Thrown if the process times out. |