public static void Configure(CommandLineApplication app, CommandLineOptions options, IConsole console) { // description app.Description = $"Manage APIs"; app.HelpOption(); // commands app.Command("add", command => AddApiResourceCommand.Configure(command, options, console)); app.Command("remove", command => RemoveCommand.Configure(command, options, GetRemoveCommandOptions())); app.Command("show", command => ShowCommand.Configure(command, options, GetShowCommandOptions())); // action (for this command) app.OnExecute(() => app.ShowVersionAndHelp()); }
public static void Configure(CommandLineApplication app, CommandLineOptions options, IConsole console) { // description app.Description = "Manage users"; app.HelpOption(); // commands app.Command("add", command => AddUserCommand.Configure(command, options, console)); app.Command("remove", command => RemoveCommand.Configure(command, options, GetRemoveCommandOptions())); app.Command("show", command => ShowCommand.Configure(command, options, GetShowCommandOptions())); app.Command("modify", command => ModifyUserCommand.Configure(command, options)); app.Command("roles", command => AssignUserRolesCommand.Configure(command, options)); // action (for this command) app.OnExecute(() => app.ShowVersionAndHelp()); }
public static void Configure(CommandLineApplication app, CommandLineOptions options, IConsole console) { // description app.Description = "Manage clients"; app.HelpOption(); // commands app.Command("add", command => AddClientCommand.Configure(command, options, console)); app.Command("remove", command => RemoveCommand.Configure(command, options, GetRemoveCommandOptions())); app.Command("show", command => ShowCommand.Configure(command, options, GetShowCommandOptions())); app.Command("enable", command => EnableClientCommand.Configure(command, options)); app.Command("disable", command => DisableClientCommand.Configure(command, options)); // action (for this command) app.OnExecute(() => app.ShowVersionAndHelp()); }