Table of Contents

Class Executor

Namespace
ZeroInstall.Services.Executors
Assembly
ZeroInstall.Services.dll

Executes a Selections document as a program using dependency injection.

public class Executor : IExecutor
Inheritance
Executor
Implements
Inherited Members

Remarks

This class is immutable and thread-safe.

Constructors

Executor(IImplementationStore)

Executes a Selections document as a program using dependency injection.

public Executor(IImplementationStore implementationStore)

Parameters

implementationStore IImplementationStore

Remarks

This class is immutable and thread-safe.

Methods

Inject(Selections, string?)

Starts building an execution environment for a Selections document.

public IEnvironmentBuilder Inject(Selections selections, string? overrideMain = null)

Parameters

selections Selections

The set of Implementations be injected into the execution environment.

overrideMain string

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

IEnvironmentBuilder

A fluent-style builder for a process execution environment.

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.

Start(Selections)

Starts a program as described by a Selections document.

public Process? Start(Selections selections)

Parameters

selections Selections

The set of Implementations be injected into the execution environment.

Returns

Process

The newly created Process; null if no external process was started.

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.