Zero Install .NET API 2.20.0
ZeroInstall.Publish.Capture.CommandMapper Class Reference

Maps command-lines to the best matching Command. More...

Public Member Functions

 CommandMapper (string installationDir, [InstantHandle] IEnumerable< Command > commands)
 Creates a new command provider. More...
 
CommandGetCommand (string commandLine, out string? additionalArgs)
 Tries to find the best-match Command for a command-line. More...
 

Properties

string InstallationDir [get]
 The fully qualified path to the installation directory.
 

Detailed Description

Maps command-lines to the best matching Command.

Constructor & Destructor Documentation

◆ CommandMapper()

ZeroInstall.Publish.Capture.CommandMapper.CommandMapper ( string  installationDir,
[InstantHandle] IEnumerable< Command commands 
)
inline

Creates a new command provider.

Parameters
installationDirThe fully qualified path to the installation directory.
commandsA list of all known-commands available within the installation directory.

Member Function Documentation

◆ GetCommand()

Command? ZeroInstall.Publish.Capture.CommandMapper.GetCommand ( string  commandLine,
out string?  additionalArgs 
)
inline

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

Parameters
commandLineThe fully qualified command-line to try to match.
additionalArgsAny additional arguments from commandLine that are not covered by the returned Command.
Returns
The best matching Command or null if no match was found.

The documentation for this class was generated from the following file: