示例#1
0
        private static Command ConstructCommand()
        {
            var command = new DocumentedCommand("publish", DocsLink, LocalizableStrings.AppDescription);

            command.AddArgument(SlnOrProjectArgument);
            RestoreCommandParser.AddImplicitRestoreOptions(command, includeRuntimeOption: false, includeNoDependenciesOption: true);
            command.AddOption(OuputOption);
            command.AddOption(ManifestOption);
            command.AddOption(NoBuildOption);
            command.AddOption(SelfContainedOption);
            command.AddOption(NoSelfContainedOption);
            command.AddOption(NoLogoOption);
            command.AddOption(FrameworkOption);
            command.AddOption(RuntimeOption.WithHelpDescription(command, LocalizableStrings.RuntimeOptionDescription));
            command.AddOption(ConfigurationOption);
            command.AddOption(CommonOptions.VersionSuffixOption);
            command.AddOption(CommonOptions.InteractiveMsBuildForwardOption);
            command.AddOption(NoRestoreOption);
            command.AddOption(CommonOptions.VerbosityOption);
            command.AddOption(CommonOptions.ArchitectureOption);
            command.AddOption(CommonOptions.OperatingSystemOption);
            command.AddOption(CommonOptions.DisableBuildServersOption);

            command.Handler = CommandHandler.Create<ParseResult>(PublishCommand.Run);

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

            command.AddArgument(SlnOrProjectArgument);
            RestoreCommandParser.AddImplicitRestoreOptions(command, includeRuntimeOption: false, includeNoDependenciesOption: false);
            command.AddOption(FrameworkOption);
            command.AddOption(ConfigurationOption);
            command.AddOption(RuntimeOption.WithHelpDescription(command, LocalizableStrings.RuntimeOptionDescription));
            command.AddOption(CommonOptions.VersionSuffixOption);
            command.AddOption(NoRestoreOption);
            command.AddOption(CommonOptions.InteractiveMsBuildForwardOption);
            command.AddOption(CommonOptions.VerbosityOption);
            command.AddOption(CommonOptions.DebugOption);
            command.AddOption(OutputOption);
            command.AddOption(NoIncrementalOption);
            command.AddOption(NoDependenciesOption);
            command.AddOption(NoLogoOption);
            command.AddOption(SelfContainedOption);
            command.AddOption(NoSelfContainedOption);
            command.AddOption(CommonOptions.ArchitectureOption);
            command.AddOption(CommonOptions.OperatingSystemOption);
            command.AddOption(CommonOptions.DisableBuildServersOption);

            command.SetHandler(BuildCommand.Run);

            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);
        }
示例#4
0
        private static Command ConstructCommand()
        {
            var command = new DocumentedCommand("list", DocsLink, LocalizableStrings.NetListCommand);

            command.AddArgument(SlnOrProjectArgument);
            command.AddCommand(ListPackageReferencesCommandParser.GetCommand());
            command.AddCommand(ListProjectToProjectReferencesCommandParser.GetCommand());

            command.SetHandler((parseResult) => parseResult.HandleMissingCommand());

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

            command.AddArgument(ProjectArgument);
            command.AddCommand(RemovePackageParser.GetCommand());
            command.AddCommand(RemoveProjectToProjectReferenceParser.GetCommand());

            command.SetHandler((parseResult) => parseResult.HandleMissingCommand());

            return(command);
        }
示例#6
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);
        }
示例#7
0
        private static Command ConstructCommand()
        {
            var command = new DocumentedCommand("restore", DocsLink, LocalizableStrings.AppFullName);

            command.AddArgument(SlnOrProjectArgument);
            command.AddOption(CommonOptions.DisableBuildServersOption);

            foreach (var option in FullRestoreOptions())
            {
                command.AddOption(option);
            }

            command.Handler = CommandHandler.Create<ParseResult>(RestoreCommand.Run);

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

            command.AddArgument(SlnOrProjectArgument);
            command.AddOption(FrameworkOption);
            command.AddOption(CommonOptions.RuntimeOption.WithHelpDescription(command, LocalizableStrings.RuntimeOptionDescription));
            command.AddOption(ConfigurationOption);
            command.AddOption(CommonOptions.InteractiveMsBuildForwardOption);
            command.AddOption(CommonOptions.VerbosityOption);
            command.AddOption(OutputOption);
            command.AddOption(NoLogoOption);

            command.Handler = CommandHandler.Create <ParseResult>(CleanCommand.Run);

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

            command.AddArgument(Argument);
            command.AddOption(ManifestOption);
            command.AddOption(FrameworkVersionOption);
            command.AddOption(OutputOption);
            command.AddOption(WorkingDirOption);
            command.AddOption(SkipOptimizationOption);
            command.AddOption(SkipSymbolsOption);
            command.AddOption(CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription));
            command.AddOption(CommonOptions.RuntimeOption.WithHelpDescription(command, LocalizableStrings.RuntimeOptionDescription));
            command.AddOption(CommonOptions.VerbosityOption);
            command.AddOption(CommonOptions.CurrentRuntimeOption(LocalizableStrings.CurrentRuntimeOptionDescription));

            command.SetHandler(StoreCommand.Run);

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

            command.AddArgument(SlnOrProjectArgument);
            command.AddOption(OutputOption);
            command.AddOption(NoBuildOption);
            command.AddOption(IncludeSymbolsOption);
            command.AddOption(IncludeSourceOption);
            command.AddOption(ServiceableOption);
            command.AddOption(NoLogoOption);
            command.AddOption(CommonOptions.InteractiveMsBuildForwardOption);
            command.AddOption(NoRestoreOption);
            command.AddOption(CommonOptions.VerbosityOption);
            command.AddOption(CommonOptions.VersionSuffixOption);
            command.AddOption(ConfigurationOption);
            RestoreCommandParser.AddImplicitRestoreOptions(command, includeRuntimeOption: true, includeNoDependenciesOption: true);

            command.SetHandler(PackCommand.Run);

            return(command);
        }
示例#11
0
        private static Command ConstructCommand()
        {
            var command = new DocumentedCommand("nuget", DocsLink);

            command.AddOption(new Option <bool>("--version"));
            command.AddOption(new Option <string>(new string[] { "-v", "--verbosity" }));
            command.AddArgument(new Argument()
            {
                IsHidden = true
            });

            command.AddCommand(GetDeleteCommand());
            command.AddCommand(GetLocalsCommand());
            command.AddCommand(GetPushCommand());
            command.AddCommand(GetVerifyCommand());
            command.AddCommand(GetTrustCommand());
            command.AddCommand(GetSignCommand());

            command.Handler = CommandHandler.Create <ParseResult>(NuGetCommand.Run);

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

            command.AddArgument(SlnOrProjectArgument);

            command.AddOption(SettingsOption);
            command.AddOption(ListTestsOption);
            command.AddOption(EnvOption);
            command.AddOption(FilterOption);
            command.AddOption(AdapterOption);
            command.AddOption(LoggerOption);
            command.AddOption(OutputOption);
            command.AddOption(DiagOption);
            command.AddOption(NoBuildOption);
            command.AddOption(ResultsOption);
            command.AddOption(CollectOption);
            command.AddOption(BlameOption);
            command.AddOption(BlameCrashOption);
            command.AddOption(BlameCrashDumpOption);
            command.AddOption(BlameCrashAlwaysOption);
            command.AddOption(BlameHangOption);
            command.AddOption(BlameHangDumpOption);
            command.AddOption(BlameHangTimeoutOption);
            command.AddOption(NoLogoOption);
            command.AddOption(ConfigurationOption);
            command.AddOption(FrameworkOption);
            command.AddOption(CommonOptions.RuntimeOption.WithHelpDescription(command, LocalizableStrings.RuntimeOptionDescription));
            command.AddOption(NoRestoreOption);
            command.AddOption(CommonOptions.InteractiveMsBuildForwardOption);
            command.AddOption(CommonOptions.VerbosityOption);
            command.AddOption(CommonOptions.ArchitectureOption);
            command.AddOption(CommonOptions.OperatingSystemOption);

            command.SetHandler(TestCommand.Run);

            return(command);
        }
示例#13
0
        private static Command ConstructCommand()
        {
            var command = new DocumentedCommand("new", DocsLink);

            command.AddArgument(Argument);
            command.AddOption(ListOption);
            command.AddOption(NameOption);
            command.AddOption(OutputOption);
            command.AddOption(InstallOption);
            command.AddOption(UninstallOption);
            command.AddOption(InteractiveOption);
            command.AddOption(NuGetSourceOption);
            command.AddOption(TypeOption);
            command.AddOption(DryRunOption);
            command.AddOption(ForceOption);
            command.AddOption(LanguageOption);
            command.AddOption(UpdateCheckOption);
            command.AddOption(UpdateApplyOption);
            command.AddOption(ColumnsOption);

            command.Handler = CommandHandler.Create <ParseResult>((ParseResult parseResult) => NewCommandShim.Run(parseResult.GetArguments()));

            return(command);
        }