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
installationDirstringThe fully qualified path to the installation directory.
commandsIEnumerable<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
commandLinestringThe fully qualified command-line to try to match.
additionalArgsstringAny additional arguments from
commandLinethat are not covered by the returned Command.