Exemplo n.º 1
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.º 2
0
 public static Command ToolInstall()
 {
     return(Create.Command("install",
                           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(
                               "--version",
                               LocalizableStrings.VersionOptionDescription,
                               Accept.ExactlyOneArgument()
                               .With(name: LocalizableStrings.VersionOptionName)),
                           Create.Option(
                               "--configfile",
                               LocalizableStrings.ConfigFileOptionDescription,
                               Accept.ExactlyOneArgument()
                               .With(name: LocalizableStrings.ConfigFileOptionName)),
                           Create.Option(
                               $"--{ToolAppliedOption.ToolManifest}",
                               LocalizableStrings.ManifestPathOptionDescription,
                               Accept.ZeroOrOneArgument()
                               .With(name: LocalizableStrings.ManifestPathOptionName)),
                           Create.Option(
                               "--add-source",
                               LocalizableStrings.AddSourceOptionDescription,
                               Accept.OneOrMoreArguments()
                               .With(name: LocalizableStrings.AddSourceOptionName)),
                           Create.Option(
                               "--framework",
                               LocalizableStrings.FrameworkOptionDescription,
                               Accept.ExactlyOneArgument()
                               .With(name: LocalizableStrings.FrameworkOptionName)),
                           ToolCommandRestorePassThroughOptions.DisableParallelOption(),
                           ToolCommandRestorePassThroughOptions.IgnoreFailedSourcesOption(),
                           ToolCommandRestorePassThroughOptions.NoCacheOption(),
                           ToolCommandRestorePassThroughOptions.InteractiveRestoreOption(),
                           CommonOptions.HelpOption(),
                           CommonOptions.VerbosityOption()));
 }
Exemplo n.º 3
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)),
                           ToolCommandRestorePassThroughOptions.DisableParallelOption(),
                           ToolCommandRestorePassThroughOptions.IgnoreFailedSourcesOption(),
                           ToolCommandRestorePassThroughOptions.NoCacheOption(),
                           CommonOptions.HelpOption(),
                           CommonOptions.VerbosityOption()));
 }