Interface IExecutor
Executes a Selections document as a program using dependency injection.
Namespace: ZeroInstall.Services.Executors
Assembly: ZeroInstall.Services.dll
Syntax
public interface IExecutor
Remarks
Implementations of this interface are immutable and thread-safe.
Methods
Inject(Selections, String)
Starts building an execution environment for a Selections document.
Declaration
IEnvironmentBuilder Inject(Selections selections, string overrideMain = null)
Parameters
Type | Name | Description |
---|---|---|
Selections | selections | The set of Implementations be injected into the execution environment. |
String | overrideMain | An alternative executable to to run from the main Implementation instead of Main. May not contain command-line arguments! Whitespaces do not need to be escaped. |
Returns
Type | Description |
---|---|
IEnvironmentBuilder | A fluent-style builder for a process execution environment. |
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. |
Start(Selections)
Starts a program as described by a Selections document.
Declaration
Process Start(Selections selections)
Parameters
Type | Name | Description |
---|---|---|
Selections | selections | The set of Implementations be injected into the execution environment. |
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. |