示例#1
0
 public static Command Add() =>
 Create.Command(
     "add",
     LocalizableStrings.NetAddCommand,
     Accept.ExactlyOneArgument()
     .DefaultToCurrentDirectory()
     .With(name: CommonLocalizableStrings.CmdProjectFile,
           description: CommonLocalizableStrings.ArgumentsProjectDescription), AddPackageParser.AddPackage(),
     AddProjectToProjectReferenceParser.AddProjectReference(),
     CommonOptions.HelpOption());
示例#2
0
        public static Command GetCommand()
        {
            var command = new Command("add", LocalizableStrings.NetAddCommand);

            command.AddArgument(ProjectArgument);
            command.AddCommand(AddPackageParser.GetCommand());
            command.AddCommand(AddProjectToProjectReferenceParser.GetCommand());

            return(command);
        }
示例#3
0
        private static Command ConstructCommand()
        {
            var command = new DocumentedCommand("add", DocsLink, LocalizableStrings.NetAddCommand);

            command.AddArgument(ProjectArgument);
            command.AddCommand(AddPackageParser.GetCommand());
            command.AddCommand(AddProjectToProjectReferenceParser.GetCommand());

            command.Handler = CommandHandler.Create <ParseResult>((parseResult) => parseResult.HandleMissingCommand());

            return(command);
        }