Esempio n. 1
0
 public static Command Tool()
 {
     return(Create.Command(
                "tool",
                LocalizableStrings.CommandDescription,
                Accept.NoArguments(),
                CommonOptions.HelpOption(),
                ToolInstallCommandParser.ToolInstall(),
                ToolUninstallCommandParser.ToolUninstall(),
                ToolUpdateCommandParser.ToolUpdate(),
                ToolListCommandParser.ToolList()));
 }
Esempio n. 2
0
        public static Command GetCommand()
        {
            var command = new Command("tool", LocalizableStrings.CommandDescription);

            command.AddCommand(ToolInstallCommandParser.GetCommand());
            command.AddCommand(ToolUninstallCommandParser.GetCommand());
            command.AddCommand(ToolUpdateCommandParser.GetCommand());
            command.AddCommand(ToolListCommandParser.GetCommand());
            command.AddCommand(ToolRunCommandParser.GetCommand());
            command.AddCommand(ToolSearchCommandParser.GetCommand());
            command.AddCommand(ToolRestoreCommandParser.GetCommand());

            return(command);
        }
Esempio n. 3
0
        private static Command ConstructCommand()
        {
            var command = new DocumentedCommand("tool", DocsLink, LocalizableStrings.CommandDescription);

            command.AddCommand(ToolInstallCommandParser.GetCommand());
            command.AddCommand(ToolUninstallCommandParser.GetCommand());
            command.AddCommand(ToolUpdateCommandParser.GetCommand());
            command.AddCommand(ToolListCommandParser.GetCommand());
            command.AddCommand(ToolRunCommandParser.GetCommand());
            command.AddCommand(ToolSearchCommandParser.GetCommand());
            command.AddCommand(ToolRestoreCommandParser.GetCommand());

            command.SetHandler((parseResult) => parseResult.HandleMissingCommand());

            return(command);
        }