Class Run
This behaves similarly to Download, except that it also runs the program after ensuring it is in the cache.
Inherited Members
Namespace: ZeroInstall.Commands.Basic
Assembly: 0install.dll
Syntax
public class Run : Download
Constructors
Run(ICommandHandler)
Creates a new run command.
Declaration
public Run(ICommandHandler handler)
Parameters
Type | Name | Description |
---|---|---|
ICommandHandler | handler | A callback object used when the the user needs to be asked questions or informed about download and IO tasks. |
Fields
Name
Declaration
public const string Name = "run"
Field Value
Type | Description |
---|---|
String |
Properties
AdditionalArgsMax
Declaration
protected override int AdditionalArgsMax { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Description
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
Usage
Declaration
public override string Usage { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
Methods
Execute()
Executes the commands specified by the command-line arguments. Must call Parse(IReadOnlyList<String>) first!
Declaration
public override ExitCode Execute()
Returns
Type | Description |
---|---|
ExitCode | The exit status code to end the process with. |
Overrides
Remarks
When inheriting this method is usually replaced.
Exceptions
Type | Condition |
---|---|
OperationCanceledException | The user canceled the task. |
NDesk.Options.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. |
Solve()
Runs Solve(Requirements) (unless SelectionsDocument is true
) and stores the result in Selections.
Declaration
protected override void Solve()
Overrides
Exceptions
Type | Condition |
---|---|
OperationCanceledException | The user canceled the task. |
WebException | A file could not be downloaded from the internet. |
IOException | An external application or file required by the solver could not be accessed. |
SolverException | The ISolver was unable to provide Selections that fulfill the Requirements. |