Exemplo n.º 1
0
 public static Command Pack() =>
 CreateWithRestoreOptions.Command(
     "pack",
     LocalizableStrings.AppFullName,
     Accept.ZeroOrMoreArguments()
     .With(name: CommonLocalizableStrings.ProjectArgumentName,
           description: CommonLocalizableStrings.ProjectArgumentDescription),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.CmdOutputDirDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.CmdOutputDir)
         .ForwardAsSingle(o => $"-property:PackageOutputPath={CommandDirectoryContext.GetFullPath(o.Arguments.Single())}")),
     Create.Option(
         "--no-build",
         LocalizableStrings.CmdNoBuildOptionDescription,
         Accept.NoArguments().ForwardAs("-property:NoBuild=true")),
     Create.Option(
         "--include-symbols",
         LocalizableStrings.CmdIncludeSymbolsDescription,
         Accept.NoArguments().ForwardAs("-property:IncludeSymbols=true")),
     Create.Option(
         "--include-source",
         LocalizableStrings.CmdIncludeSourceDescription,
         Accept.NoArguments().ForwardAs("-property:IncludeSource=true")),
     CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "-s|--serviceable",
         LocalizableStrings.CmdServiceableDescription,
         Accept.NoArguments().ForwardAs("-property:Serviceable=true")),
     CommonOptions.InteractiveMsBuildForwardOption(),
     CommonOptions.NoRestoreOption(),
     CommonOptions.VerbosityOption());
Exemplo n.º 2
0
 public static Command SlnRemove() =>
 Create.Command("remove",
                LocalizableStrings.RemoveAppFullName,
                Accept.OneOrMoreArguments(o => CommonLocalizableStrings.SpecifyAtLeastOneProjectToRemove)
                .With(name: "args",
                      description: LocalizableStrings.RemoveSubcommandHelpText),
                CommonOptions.HelpOption());
Exemplo n.º 3
0
 public static Command Migrate() =>
 Create.Command(
     "migrate",
     ".NET Migrate Command",
     Accept.ZeroOrOneArgument()
     .With(name: LocalizableStrings.CmdProjectArgument,
           description: LocalizableStrings.CmdProjectArgumentDescription),
     CommonOptions.HelpOption(),
     Create.Option("-t|--template-file",
                   LocalizableStrings.CmdTemplateDescription,
                   Accept.ExactlyOneArgument()),
     Create.Option("-v|--sdk-package-version",
                   LocalizableStrings.CmdVersionDescription,
                   Accept.ExactlyOneArgument()),
     Create.Option("-x|--xproj-file",
                   LocalizableStrings.CmdXprojFileDescription,
                   Accept.ExactlyOneArgument()),
     Create.Option("-s|--skip-project-references",
                   LocalizableStrings.CmdSkipProjectReferencesDescription),
     Create.Option("-r|--report-file",
                   LocalizableStrings.CmdReportFileDescription,
                   Accept.ExactlyOneArgument()),
     Create.Option("--format-report-file-json",
                   LocalizableStrings.CmdReportOutputDescription),
     Create.Option("--skip-backup",
                   LocalizableStrings.CmdSkipBackupDescription));
Exemplo n.º 4
0
 public static Command SlnAdd() =>
 Create.Command("add",
                LocalizableStrings.AddAppFullName,
                Accept.OneOrMoreArguments(o => CommonLocalizableStrings.SpecifyAtLeastOneProjectToAdd)
                .With(name: LocalizableStrings.AddProjectPathArgumentName,
                      description: LocalizableStrings.AddProjectPathArgumentDescription),
                CommonOptions.HelpOption());
Exemplo n.º 5
0
 public static Command ToolUninstall()
 {
     return(Create.Command("uninstall",
                           LocalizableStrings.CommandDescription,
                           Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageId)
                           .With(name: LocalizableStrings.PackageIdArgumentName,
                                 description: LocalizableStrings.PackageIdArgumentDescription),
                           Create.Option(
                               $"-g|--{ToolAppliedOption.GlobalOption}",
                               LocalizableStrings.GlobalOptionDescription,
                               Accept.NoArguments()),
                           Create.Option(
                               $"--{ToolAppliedOption.LocalOption}",
                               LocalizableStrings.LocalOptionDescription,
                               Accept.NoArguments()),
                           Create.Option(
                               $"--{ToolAppliedOption.ToolPathOption}",
                               LocalizableStrings.ToolPathOptionDescription,
                               Accept.ExactlyOneArgument()
                               .With(name: LocalizableStrings.ToolPathOptionName)),
                           Create.Option(
                               $"--{ToolAppliedOption.ToolManifest}",
                               LocalizableStrings.ManifestPathOptionDescription,
                               Accept.ZeroOrOneArgument()
                               .With(name: LocalizableStrings.ManifestPathOptionName)),
                           CommonOptions.HelpOption()));
 }
Exemplo n.º 6
0
 public static Command ToolSearch()
 {
     return(Create.Command(
                "search",
                LocalizableStrings.CommandDescription,
                Accept.ZeroOrMoreArguments()
                .With(name: LocalizableStrings.SearchTermArgumentName,
                      description: LocalizableStrings.SearchTermDescription),
                Create.Option(
                    $"--detail",
                    LocalizableStrings.DetailDescription,
                    Accept.NoArguments()),
                Create.Option(
                    $"--skip",
                    LocalizableStrings.SkipDescription,
                    Accept.ExactlyOneArgument()
                    .With(name: LocalizableStrings.SkipArgumentName)),
                Create.Option(
                    $"--take",
                    LocalizableStrings.TakeDescription,
                    Accept.ExactlyOneArgument()
                    .With(name: LocalizableStrings.TakeArgumentName)),
                Create.Option(
                    $"--prerelease",
                    LocalizableStrings.PrereleaseDescription,
                    Accept.NoArguments()),
                Create.Option(
                    $"--semver-level",
                    LocalizableStrings.SemVerLevelDescription,
                    Accept.ExactlyOneArgument()
                    .With(name: LocalizableStrings.SemVerLevelArgumentName)),
                CommonOptions.HelpOption()));
 }
Exemplo n.º 7
0
 public static Command Run() =>
 Create.Command(
     "run",
     LocalizableStrings.AppFullName,
     treatUnmatchedTokensAsErrors: false,
     arguments: Accept.ZeroOrMoreArguments()
     .MaterializeAs(o => new RunCommand
 {
     Configuration = o.SingleArgumentOrDefault("--configuration"),
     Framework     = o.SingleArgumentOrDefault("--framework"),
     NoBuild       = o.HasOption("--no-build"),
     Project       = o.SingleArgumentOrDefault("--project"),
     Args          = o.Arguments
 }),
     options: new[]
 {
     CommonOptions.HelpOption(),
     CommonOptions.ConfigurationOption(),
     CommonOptions.FrameworkOption(),
     Create.Option(
         "-p|--project",
         LocalizableStrings.CommandOptionProjectDescription,
         Accept.ExactlyOneArgument()),
     Create.Option(
         "--no-build",
         LocalizableStrings.CommandOptionNoBuildDescription,
         Accept.NoArguments())
 });
Exemplo n.º 8
0
 public static Command ToolRestore()
 {
     return(Create.Command(
                "restore",
                LocalizableStrings.CommandDescription,
                Accept.NoArguments(),
                Create.Option(
                    "--configfile",
                    LocalizableStrings.ConfigFileOptionDescription,
                    Accept.ExactlyOneArgument()
                    .With(name: LocalizableStrings.ConfigFileOptionName)),
                Create.Option(
                    "--add-source",
                    LocalizableStrings.AddSourceOptionDescription,
                    Accept.OneOrMoreArguments()
                    .With(name: LocalizableStrings.AddSourceOptionName)),
                Create.Option(
                    "--tool-manifest",
                    LocalizableStrings.ManifestPathOptionDescription,
                    Accept.ZeroOrOneArgument()
                    .With(name: LocalizableStrings.ManifestPathOptionName)),
                ToolCommandRestorePassThroughOptions.DisableParallelOption(),
                ToolCommandRestorePassThroughOptions.IgnoreFailedSourcesOption(),
                ToolCommandRestorePassThroughOptions.NoCacheOption(),
                ToolCommandRestorePassThroughOptions.InteractiveRestoreOption(),
                CommonOptions.HelpOption(),
                CommonOptions.VerbosityOption()));
 }
Exemplo n.º 9
0
 public static Command Publish() =>
 CreateWithRestoreOptions.Command(
     "publish",
     LocalizableStrings.AppDescription,
     Accept.ZeroOrMoreArguments(),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.OutputOptionDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.OutputOption)
         .ForwardAsSingle(o => $"/p:PublishDir={o.Arguments.Single()}")),
     CommonOptions.FrameworkOption(),
     CommonOptions.RuntimeOption(),
     CommonOptions.ConfigurationOption(),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "--manifest",
         LocalizableStrings.ManifestOptionDescription,
         Accept.OneOrMoreArguments()
         .With(name: LocalizableStrings.ManifestOption)
         .ForwardAsSingle(o => $"/p:TargetManifestFiles={string.Join("%3B", o.Arguments)}")),
     Create.Option(
         "--self-contained",
         LocalizableStrings.SelfContainedOptionDescription,
         Accept.ZeroOrOneArgument()
         .WithSuggestionsFrom("true", "false")
         .ForwardAsSingle(o =>
 {
     string value = o.Arguments.Any() ? o.Arguments.Single() : "true";
     return($"/p:SelfContained={value}");
 })),
     CommonOptions.NoRestoreOption(),
     CommonOptions.VerbosityOption());
Exemplo n.º 10
0
 public static Command Migrate() =>
 Create.Command(
     "migrate",
     ".NET Migrate Command",
     Accept.ZeroOrOneArgument()
     .MaterializeAs(o =>
                    new MigrateCommand(
                        o.ValueOrDefault <string>("--template-file"),
                        o.Arguments.FirstOrDefault(),
                        o.ValueOrDefault <string>("--sdk-package-version"),
                        o.ValueOrDefault <string>("--xproj-file"),
                        o.ValueOrDefault <string>("--report-file"),
                        o.ValueOrDefault <bool>("--skip-project-references"),
                        o.ValueOrDefault <bool>("--format-report-file-json"),
                        o.ValueOrDefault <bool>("--skip-backup")))
     .With(name: LocalizableStrings.CmdProjectArgument,
           description: LocalizableStrings.CmdProjectArgumentDescription),
     CommonOptions.HelpOption(),
     Create.Option("-t|--template-file",
                   LocalizableStrings.CmdTemplateDescription),
     Create.Option("-v|--sdk-package-version",
                   LocalizableStrings.CmdVersionDescription),
     Create.Option("-x|--xproj-file",
                   LocalizableStrings.CmdXprojFileDescription),
     Create.Option("-s|--skip-project-references",
                   LocalizableStrings.CmdSkipProjectReferencesDescription),
     Create.Option("-r|--report-file",
                   LocalizableStrings.CmdReportFileDescription),
     Create.Option("--format-report-file-json",
                   LocalizableStrings.CmdReportOutputDescription),
     Create.Option("--skip-backup",
                   LocalizableStrings.CmdSkipBackupDescription));
Exemplo n.º 11
0
 public static Command Build() =>
 CreateWithRestoreOptions.Command(
     "build",
     LocalizableStrings.AppFullName,
     Accept.ZeroOrMoreArguments()
     .With(name: CommonLocalizableStrings.CmdProjectFile,
           description:
           "The MSBuild project file to build. If a project file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in `proj` and uses that file."),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.OutputOptionDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.OutputOptionName)
         .ForwardAsSingle(o => $"-property:OutputPath={o.Arguments.Single()}")),
     CommonOptions.FrameworkOption(),
     CommonOptions.RuntimeOption(),
     CommonOptions.ConfigurationOption(),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "--no-incremental",
         LocalizableStrings.NoIncrementialOptionDescription),
     Create.Option(
         "--no-dependencies",
         LocalizableStrings.NoDependenciesOptionDescription,
         Accept.NoArguments()
         .ForwardAs("-property:BuildProjectReferences=false")),
     CommonOptions.NoRestoreOption(),
     CommonOptions.VerbosityOption());
 public static Command Pack() =>
 Create.Command(
     "pack",
     LocalizableStrings.AppFullName,
     Accept.ZeroOrMoreArguments(),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.CmdOutputDirDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.CmdOutputDir)
         .ForwardAsSingle(o => $"/p:PackageOutputPath={o.Arguments.Single()}")),
     Create.Option(
         "--no-build",
         LocalizableStrings.CmdNoBuildOptionDescription,
         Accept.NoArguments().ForwardAs("/p:NoBuild=true")),
     Create.Option(
         "--include-symbols",
         LocalizableStrings.CmdIncludeSymbolsDescription,
         Accept.NoArguments().ForwardAs("/p:IncludeSymbols=true")),
     Create.Option(
         "--include-source",
         LocalizableStrings.CmdIncludeSourceDescription,
         Accept.NoArguments().ForwardAs("/p:IncludeSource=true")),
     CommonOptions.ConfigurationOption(),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "-s|--serviceable",
         LocalizableStrings.CmdServiceableDescription,
         Accept.NoArguments().ForwardAs("/p:Serviceable=true")),
     CommonOptions.VerbosityOption());
Exemplo n.º 13
0
 public static Command ListPackageReferences() => Create.Command(
     "package",
     LocalizableStrings.AppFullName,
     Accept.ZeroOrOneArgument(),
     CommonOptions.HelpOption(),
     Create.Option("--outdated",
                   LocalizableStrings.CmdOutdatedDescription),
     Create.Option("--framework",
                   LocalizableStrings.CmdFrameworkDescription,
                   Accept.OneOrMoreArguments()
                   .With(name: LocalizableStrings.CmdFramework)
                   .ForwardAsSingle(o => $"--framework {string.Join("%3B", o.Arguments)}")),
     Create.Option("--include-transitive",
                   LocalizableStrings.CmdTransitiveDescription),
     Create.Option("--include-prerelease",
                   LocalizableStrings.CmdPrereleaseDescription),
     Create.Option("--highest-patch",
                   LocalizableStrings.CmdHighestPatchDescription),
     Create.Option("--highest-minor",
                   LocalizableStrings.CmdHighestMinorDescription),
     Create.Option("--config",
                   LocalizableStrings.CmdConfigDescription,
                   Accept.ExactlyOneArgument()
                   .With(name: LocalizableStrings.CmdConfig)
                   .ForwardAsSingle(o => $"--config {o.Arguments.Single()}")),
     Create.Option("--source",
                   LocalizableStrings.CmdSourceDescription,
                   Accept.OneOrMoreArguments()
                   .With(name: LocalizableStrings.CmdSource)
                   .ForwardAsSingle(o => $"--source {string.Join("%3B", o.Arguments)}")));
Exemplo n.º 14
0
 public static Command ToolUpdate()
 {
     return(Create.Command("update",
                           LocalizableStrings.CommandDescription,
                           Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageId)
                           .With(name: LocalizableStrings.PackageIdArgumentName,
                                 description: LocalizableStrings.PackageIdArgumentDescription),
                           Create.Option(
                               "-g|--global",
                               LocalizableStrings.GlobalOptionDescription,
                               Accept.NoArguments()),
                           Create.Option(
                               "--tool-path",
                               LocalizableStrings.ToolPathOptionDescription,
                               Accept.ExactlyOneArgument()
                               .With(name: LocalizableStrings.ToolPathOptionName)),
                           Create.Option(
                               "--configfile",
                               LocalizableStrings.ConfigFileOptionDescription,
                               Accept.ExactlyOneArgument()
                               .With(name: LocalizableStrings.ConfigFileOptionName)),
                           Create.Option(
                               "--add-source",
                               LocalizableStrings.AddSourceOptionDescription,
                               Accept.OneOrMoreArguments()
                               .With(name: LocalizableStrings.AddSourceOptionName)),
                           Create.Option(
                               "--framework",
                               LocalizableStrings.FrameworkOptionDescription,
                               Accept.ExactlyOneArgument()
                               .With(name: LocalizableStrings.FrameworkOptionName)),
                           CommonOptions.HelpOption(),
                           CommonOptions.VerbosityOption()));
 }
Exemplo n.º 15
0
 public static Command Build() =>
 CreateWithRestoreOptions.Command(
     "build",
     LocalizableStrings.AppFullName,
     Accept.ZeroOrMoreArguments()
     .With(name: CommonLocalizableStrings.ProjectArgumentName,
           description: CommonLocalizableStrings.ProjectArgumentDescription),
     CommonOptions.HelpOption(),
     Create.Option(
         "-o|--output",
         LocalizableStrings.OutputOptionDescription,
         Accept.ExactlyOneArgument()
         .With(name: LocalizableStrings.OutputOptionName)
         .ForwardAsSingle(o => $"-property:OutputPath={CommandDirectoryContext.GetFullPath(o.Arguments.Single())}")),
     CommonOptions.FrameworkOption(LocalizableStrings.FrameworkOptionDescription),
     CommonOptions.ConfigurationOption(LocalizableStrings.ConfigurationOptionDescription),
     CommonOptions.RuntimeOption(LocalizableStrings.RuntimeOptionDescription),
     CommonOptions.VersionSuffixOption(),
     Create.Option(
         "--no-incremental",
         LocalizableStrings.NoIncrementalOptionDescription),
     Create.Option(
         "--no-dependencies",
         LocalizableStrings.NoDependenciesOptionDescription,
         Accept.NoArguments()
         .ForwardAs("-property:BuildProjectReferences=false")),
     CommonOptions.NoRestoreOption(),
     CommonOptions.VerbosityOption());
Exemplo n.º 16
0
 public static Command AddPackage()
 {
     return(Create.Command(
                "package",
                LocalizableStrings.AppFullName,
                Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageReference)
                .WithSuggestionsFrom(QueryNuGet)
                .With(name: LocalizableStrings.CmdPackage,
                      description: LocalizableStrings.CmdPackageDescription),
                CommonOptions.HelpOption(),
                Create.Option("-v|--version",
                              LocalizableStrings.CmdVersionDescription,
                              Accept.ExactlyOneArgument()
                              .With(name: LocalizableStrings.CmdVersion)
                              .ForwardAsSingle(o => $"--version {o.Arguments.Single()}")),
                Create.Option("-f|--framework",
                              LocalizableStrings.CmdFrameworkDescription,
                              Accept.ExactlyOneArgument()
                              .With(name: LocalizableStrings.CmdFramework)
                              .ForwardAsSingle(o => $"--framework {o.Arguments.Single()}")),
                Create.Option("-n|--no-restore ",
                              LocalizableStrings.CmdNoRestoreDescription),
                Create.Option("-s|--source",
                              LocalizableStrings.CmdSourceDescription,
                              Accept.ExactlyOneArgument()
                              .With(name: LocalizableStrings.CmdSource)
                              .ForwardAsSingle(o => $"--source {o.Arguments.Single()}")),
                Create.Option("--package-directory",
                              LocalizableStrings.CmdPackageDirectoryDescription,
                              Accept.ExactlyOneArgument()
                              .With(name: LocalizableStrings.CmdPackageDirectory)
                              .ForwardAsSingle(o => $"--package-directory {o.Arguments.Single()}"))));
 }
Exemplo n.º 17
0
 public static Command InstallTool()
 {
     return(Create.Command("tool",
                           LocalizableStrings.CommandDescription,
                           Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOnePackageId)
                           .With(name: LocalizableStrings.PackageIdArgumentName,
                                 description: LocalizableStrings.PackageIdArgumentDescription),
                           Create.Option(
                               "-g|--global",
                               LocalizableStrings.GlobalOptionDescription,
                               Accept.NoArguments()),
                           Create.Option(
                               "--version",
                               LocalizableStrings.VersionOptionDescription,
                               Accept.ExactlyOneArgument()),
                           Create.Option(
                               "--configfile",
                               LocalizableStrings.ConfigFileOptionDescription,
                               Accept.ExactlyOneArgument()),
                           Create.Option(
                               "--source",
                               LocalizableStrings.SourceOptionDescription,
                               Accept.ExactlyOneArgument()
                               .With(name: LocalizableStrings.SourceOptionName)),
                           Create.Option(
                               "-f|--framework",
                               LocalizableStrings.FrameworkOptionDescription,
                               Accept.ExactlyOneArgument()),
                           CommonOptions.HelpOption(),
                           CommonOptions.VerbosityOption()));
 }
Exemplo n.º 18
0
        private static Option[] FullRestoreOptions()
        {
            var fullRestoreOptions = AddImplicitRestoreOptions(new Option[] { CommonOptions.HelpOption() }, true, true);

            return(fullRestoreOptions.Concat(
                       new Option[] {
                CommonOptions.VerbosityOption(),
                Create.Option(
                    "--interactive",
                    LocalizableStrings.CmdInteractiveRestoreOptionDescription,
                    Accept.NoArguments()
                    .ForwardAs("-property:NuGetInteractive=true")),
                Create.Option(
                    "--use-lock-file",
                    LocalizableStrings.CmdUseLockFileOptionDescription,
                    Accept.NoArguments()
                    .ForwardAs("-property:RestorePackagesWithLockFile=true")),
                Create.Option(
                    "--locked-mode",
                    LocalizableStrings.CmdLockedModeOptionDescription,
                    Accept.NoArguments()
                    .ForwardAs("-property:RestoreLockedMode=true")),
                Create.Option(
                    "--lock-file-path",
                    LocalizableStrings.CmdLockFilePathOptionDescription,
                    Accept.ExactlyOneArgument()
                    .With(name: LocalizableStrings.CmdLockFilePathOption)
                    .ForwardAsSingle(o => $"-property:NuGetLockFilePath={o.Arguments.Single()}")),
                Create.Option(
                    "--force-evaluate",
                    LocalizableStrings.CmdReevaluateOptionDescription,
                    Accept.NoArguments()
                    .ForwardAs("-property:RestoreForceEvaluate=true"))
            }).ToArray());
        }
 public static Command ListProjectToProjectReferences()
 {
     return(Create.Command(
                "reference",
                LocalizableStrings.AppFullName,
                Accept.ZeroOrOneArgument(),
                CommonOptions.HelpOption()));
 }
Exemplo n.º 20
0
 public static Command Install()
 {
     return(Create.Command(
                "install", "",
                Accept.NoArguments(),
                CommonOptions.HelpOption(),
                InstallToolCommandParser.InstallTool()));
 }
Exemplo n.º 21
0
 public static Command CreateCommand()
 {
     return(Create.Command(
                "build-server",
                LocalizableStrings.CommandDescription,
                Accept.NoArguments(),
                CommonOptions.HelpOption(),
                ServerShutdownCommandParser.CreateCommand()));
 }
Exemplo n.º 22
0
 public static Command Update()
 {
     return(Create.Command(
                "update",
                Tools.Update.LocalizableStrings.CommandDescription,
                Accept.NoArguments(),
                CommonOptions.HelpOption(),
                UpdateToolCommandParser.Update()));
 }
Exemplo n.º 23
0
 public static Command Install()
 {
     return(Create.Command(
                "install",
                LocalizableStrings.CommandDescription,
                Accept.NoArguments(),
                CommonOptions.HelpOption(),
                InstallToolCommandParser.InstallTool()));
 }
Exemplo n.º 24
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());
Exemplo n.º 25
0
 public static Command List() => Create.Command(
     "list",
     LocalizableStrings.NetListCommand,
     Accept.ZeroOrOneArgument()
     .With(
         name: CommonLocalizableStrings.ProjectArgumentName,
         description: CommonLocalizableStrings.ProjectArgumentDescription)
     .DefaultToCurrentDirectory(),
     CommonOptions.HelpOption(),
     ListProjectToProjectReferencesCommandParser.ListProjectToProjectReferences());
Exemplo n.º 26
0
 public static Command RemovePackage()
 {
     return(Create.Command(
                "package",
                LocalizableStrings.AppFullName,
                Accept.ExactlyOneArgument()
                .With(name: Tools.Add.PackageReference.LocalizableStrings.CmdPackage,
                      description: LocalizableStrings.AppHelpText),
                CommonOptions.HelpOption()));
 }
Exemplo n.º 27
0
 public static Command ToolRun()
 {
     return(Create.Command(
                "run",
                LocalizableStrings.CommandDescription,
                Accept.ExactlyOneArgument(errorMessage: o => LocalizableStrings.SpecifyExactlyOneCommandName)
                .With(name: LocalizableStrings.CommandNameArgumentName,
                      description: LocalizableStrings.CommandNameArgumentDescription),
                treatUnmatchedTokensAsErrors: false,
                options: CommonOptions.HelpOption()));
 }
Exemplo n.º 28
0
 public static Command ListTool()
 {
     return(Create.Command(
                "tool",
                LocalizableStrings.CommandDescription,
                Create.Option(
                    "-g|--global",
                    LocalizableStrings.GlobalOptionDescription,
                    Accept.NoArguments()),
                CommonOptions.HelpOption()));
 }
Exemplo n.º 29
0
 public static Command Remove() =>
 Create.Command("remove",
                LocalizableStrings.NetRemoveCommand,
                Accept.ExactlyOneArgument()
                .DefaultToCurrentDirectory()
                .With(name: CommonLocalizableStrings.ProjectArgumentName,
                      description: CommonLocalizableStrings.ProjectArgumentDescription)
                .DefaultToCurrentDirectory(),
                CommonOptions.HelpOption(),
                RemovePackageParser.RemovePackage(),
                RemoveProjectToProjectReferenceParser.RemoveReference());
Exemplo n.º 30
0
 public static Command SlnAdd() =>
 Create.Command("add",
                LocalizableStrings.AddAppFullName,
                Accept.OneOrMoreArguments(o => CommonLocalizableStrings.SpecifyAtLeastOneProjectToAdd)
                .With(name: LocalizableStrings.AddProjectPathArgumentName,
                      description: LocalizableStrings.AddProjectPathArgumentDescription),
                Create.Option(
                    "--in-root",
                    LocalizableStrings.InRoot,
                    Accept.NoArguments()),
                Create.Option("-s|--solution-folder", LocalizableStrings.AddProjectSolutionFolderArgumentDescription, Accept.ExactlyOneArgument()),
                CommonOptions.HelpOption());