Exemplo n.º 1
0
        public static void Configure(CommandLineApplication command, GlobalOptions options)
        {
            command.Description = "Shows the list of connections.";

            command.Options.Add(options.LocalConfigFilePathOption);

            Func <int> runCommandFunc = new ConnectionsListCommand(options).Run;

            command.OnExecute(runCommandFunc);
        }
Exemplo n.º 2
0
        public static void Configure(CommandLineApplication command, GlobalOptions options)
        {
            command.Description = "Manipulates with connections (add, remove, list)";
            command.HelpOption("-?|-h|--help");

            // add local config option
            command.Options.Add(options.LocalConfigFilePathOption);

            // add connections subcommands
            command.Command("add", c => ConnectionsAddCommand.Configure(c, options));
            command.Command("remove", c => ConnectionsRemoveCommand.Configure(c, options));
            command.Command("list", c => ConnectionsListCommand.Configure(c, options));

            command.OnExecute(new ConnectionsCommand(command).Run);
        }