Beispiel #1
0
        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());
Beispiel #3
0
        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);
        }