Table of Contents

Class CommandMapper

Namespace
ZeroInstall.Publish.Capture
Assembly
ZeroInstall.Publish.dll

Maps command-lines to the best matching Command.

public class CommandMapper
Inheritance
CommandMapper
Inherited Members

Constructors

CommandMapper(string, IEnumerable<Command>)

Creates a new command provider.

public CommandMapper(string installationDir, IEnumerable<Command> commands)

Parameters

installationDir string

The fully qualified path to the installation directory.

commands IEnumerable<Command>

A list of all known-commands available within the installation directory.

Properties

InstallationDir

The fully qualified path to the installation directory.

public string InstallationDir { get; }

Property Value

string

Methods

GetCommand(string, out string?)

Tries to find the best-match Command for a command-line.

public Command? GetCommand(string commandLine, out string? additionalArgs)

Parameters

commandLine string

The fully qualified command-line to try to match.

additionalArgs string

Any additional arguments from commandLine that are not covered by the returned Command.

Returns

Command

The best matching Command or null if no match was found.