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
stringThe 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
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
stringThe fully qualified command-line to try to match.
additionalArgs
stringAny additional arguments from
commandLine
that are not covered by the returned Command.