Table of Contents

Class AppCommand

Namespace
ZeroInstall.Commands.Desktop
Assembly
0install.dll

Common base class for commands that manage an AppList.

public abstract class AppCommand : IntegrationCommand
Inheritance
AppCommand
Derived
Inherited Members

Constructors

AppCommand(ICommandHandler)

Common base class for commands that manage an AppList.

protected AppCommand(ICommandHandler handler)

Parameters

handler ICommandHandler

Fields

InterfaceUri

The interface for the application to perform the operation on.

protected FeedUri InterfaceUri

Field Value

FeedUri

Properties

AdditionalArgsMax

The maximum number of AdditionalArgs allowed. Checked in Parse(IReadOnlyList<string>).

protected override int AdditionalArgsMax { get; }

Property Value

int

AdditionalArgsMin

The minimum number of AdditionalArgs allowed. Checked in Parse(IReadOnlyList<string>).

protected override int AdditionalArgsMin { get; }

Property Value

int

IntegrationManager

Manages desktop integration operations.

protected CategoryIntegrationManager IntegrationManager { get; }

Property Value

CategoryIntegrationManager

Methods

CreateAlias(AppEntry, string, string?)

Creates a new alias.

protected void CreateAlias(AppEntry appEntry, string aliasName, string? command = null)

Parameters

appEntry AppEntry

The app entry to add the alias to.

aliasName string

The name of the alias to create.

command string

A command within the interface the alias shall point to; can be null.

Execute()

Executes the commands specified by the command-line arguments. Must call Parse(IReadOnlyList<string>) first!

public override ExitCode Execute()

Returns

ExitCode

The exit status code to end the process with.

Remarks

When inheriting this method is usually replaced.

Exceptions

OperationCanceledException

The user canceled the task.

OptionException

The number of arguments passed in on the command-line is incorrect.

WebException

A file could not be downloaded from the internet.

NotSupportedException

A file format, protocol, etc. is unknown or not supported.

IOException

A downloaded file could not be written to the disk or extracted or an external application or file required by the solver could not be accessed.

UnauthorizedAccessException

An operation failed due to insufficient rights.

InvalidDataException

A problem occurred while deserializing an XML file.

SignatureException

The signature data could not be handled for some reason.

FormatException

An URI, local path, version number, etc. is invalid.

DigestMismatchException

An Implementation's Archives don't match the associated ManifestDigest.

SolverException

The ISolver was unable to provide Selections that fulfill the Requirements.

ImplementationNotFoundException

One of the ImplementationBases is not cached yet.

ExecutorException

The IExecutor was unable to process the Selections.

ExecuteHelper()

Template method that performs the actual operation.

protected abstract ExitCode ExecuteHelper()

Returns

ExitCode

The exit status code to end the process with.