Interface IEnvironmentBuilder
- Namespace
- ZeroInstall.Services.Executors
- Assembly
- ZeroInstall.Services.dll
Fluent-style builder for a process execution environment.
public interface IEnvironmentBuilder
Methods
AddArguments(params string[])
Appends user specified arguments
to the command-line.
IEnvironmentBuilder AddArguments(params string[] arguments)
Parameters
arguments
string[]
Returns
- 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!
IEnvironmentBuilder AddWrapper(string? wrapper)
Parameters
wrapper
string
Returns
- IEnvironmentBuilder
The execution environment. Reference to self for fluent API use.
SetEnvironmentVariable(string, string)
Sets an environment variable in the execution environment.
IEnvironmentBuilder SetEnvironmentVariable(string name, string value)
Parameters
name
stringThe name of the environment variable.
value
stringThe value to set the environment variable to.
Returns
- IEnvironmentBuilder
The execution environment. Reference to self for fluent API use.
Start()
Starts the program.
Process? Start()
Returns
Exceptions
- 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.
- FileNotFoundException
Failed to find the main executable.
- IOException
Failed to start the program.
- UnauthorizedAccessException
Write access to a file is not permitted.
ToStartInfo()
Builds a ProcessStartInfo for starting the program.
ProcessStartInfo ToStartInfo()
Returns
- ProcessStartInfo
The ProcessStartInfo that can be used to start the new Process.
Exceptions
- 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.