コード例 #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);
        }
コード例 #2
0
 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());
コード例 #3
0
ファイル: SlnCommandParser.cs プロジェクト: baronfel/sdk
        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);
        }