Interface IEnvironmentBuilder
Fluent-style builder for a process execution environment.
Namespace: ZeroInstall.Services.Executors
Assembly: ZeroInstall.Services.dll
Syntax
public interface IEnvironmentBuilder
Methods
AddArguments(String[])
Appends user specified arguments
to the command-line.
Declaration
IEnvironmentBuilder AddArguments(params string[] arguments)
Parameters
Type | Name | Description |
---|---|---|
String[] | arguments |
Returns
Type | Description |
---|---|
IEnvironmentBuilder | The execution environment. Reference to self for fluent API use. |
AddWrapper(String)
Instead of executing the selected program directly, pass it as an argument to this program. Useful for debuggers. May contain command-line arguments. Whitespaces must be escaped!
Declaration
IEnvironmentBuilder AddWrapper(string wrapper)
Parameters
Type | Name | Description |
---|---|---|
String | wrapper |
Returns
Type | Description |
---|---|
IEnvironmentBuilder | The execution environment. Reference to self for fluent API use. |
SetEnvironmentVariable(String, String)
Sets an environment variable in the execution environment.
Declaration
IEnvironmentBuilder SetEnvironmentVariable(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the environment variable. |
String | value | The value to set the environment variable to. |
Returns
Type | Description |
---|---|
IEnvironmentBuilder | The execution environment. Reference to self for fluent API use. |
Start()
Starts the program.
Declaration
Process Start()
Returns
Type | Description |
---|---|
Process | The newly created Process. |
Exceptions
Type | Condition |
---|---|
ImplementationNotFoundException | One of the Implementations is not cached yet. |
ExecutorException | The IExecutor was unable to process the Selections or the main executable could not be launched. |
IOException | A problem occurred while writing a file. |
UnauthorizedAccessException | Write access to a file is not permitted. |
ToStartInfo()
Builds a ProcessStartInfo for starting the program.
Declaration
ProcessStartInfo ToStartInfo()
Returns
Type | Description |
---|---|
ProcessStartInfo | The ProcessStartInfo that can be used to start the new Process. |
Exceptions
Type | Condition |
---|---|
ImplementationNotFoundException | One of the Implementations is not cached yet. |
ExecutorException | The IExecutor was unable to process the Selections. |
IOException | A problem occurred while writing a file. |
UnauthorizedAccessException | Write access to a file is not permitted. |