public static Command GetCommand() { var command = new Command("sln", LocalizableStrings.AppFullName); command.AddArgument(SlnArgument); command.AddCommand(SlnAddParser.GetCommand()); command.AddCommand(SlnListParser.GetCommand()); command.AddCommand(SlnRemoveParser.GetCommand()); return(command); }
public static Command Sln() => Create.Command( "sln", LocalizableStrings.AppFullName, Accept.ExactlyOneArgument() .DefaultToCurrentDirectory() .With(name: CommonLocalizableStrings.CmdSlnFile, description: CommonLocalizableStrings.ArgumentsSolutionDescription), CommonOptions.HelpOption(), SlnAddParser.SlnAdd(), SlnListParser.SlnList(), SlnRemoveParser.SlnRemove());
private static Command ConstructCommand() { var command = new DocumentedCommand("sln", DocsLink, LocalizableStrings.AppFullName); command.AddArgument(SlnArgument); command.AddCommand(SlnAddParser.GetCommand()); command.AddCommand(SlnListParser.GetCommand()); command.AddCommand(SlnRemoveParser.GetCommand()); command.Handler = CommandHandler.Create <ParseResult>((parseResult) => parseResult.HandleMissingCommand()); return(command); }