Zero Install .NET API 2.20.0
ZeroInstall.Services.Executors.IExecutor Interface Reference

Executes a Selections document as a program using dependency injection. More...

Inheritance diagram for ZeroInstall.Services.Executors.IExecutor:
ZeroInstall.Services.Executors.Executor

Public Member Functions

Process? Start (Selections selections)
 Starts a program as described by a Selections document. More...
 
IEnvironmentBuilder Inject (Selections selections, string? overrideMain=null)
 Starts building an execution environment for a Selections document. More...
 

Detailed Description

Executes a Selections document as a program using dependency injection.

Implementations of this interface are immutable and thread-safe.

Member Function Documentation

◆ Inject()

IEnvironmentBuilder ZeroInstall.Services.Executors.IExecutor.Inject ( Selections  selections,
string?  overrideMain = null 
)

Starts building an execution environment for a Selections document.

Parameters
selectionsThe set of Implementations be injected into the execution environment.
overrideMainAn alternative executable to to run from the main Implementation instead of Element.Main. May not contain command-line arguments! Whitespaces do not need to be escaped.
Returns
A fluent-style builder for a process execution environment.
Exceptions
ImplementationNotFoundExceptionOne of the Implementations is not cached yet.
ExecutorExceptionThe IExecutor was unable to process the Selections.
IOExceptionA problem occurred while writing a file.
UnauthorizedAccessExceptionWrite access to a file is not permitted.

Implemented in ZeroInstall.Services.Executors.Executor.

◆ Start()

Process? ZeroInstall.Services.Executors.IExecutor.Start ( Selections  selections)

Starts a program as described by a Selections document.

Parameters
selectionsThe set of Implementations be injected into the execution environment.
Returns
The newly created Process; null if no external process was started.
Exceptions
ImplementationNotFoundExceptionOne of the Implementations is not cached yet.
ExecutorExceptionThe IExecutor was unable to process the Selections or the main executable could not be launched.
IOExceptionA problem occurred while writing a file.
UnauthorizedAccessExceptionWrite access to a file is not permitted.

Implemented in ZeroInstall.Services.Executors.Executor.


The documentation for this interface was generated from the following file: