public static Command GetCommand() { var command = new Command("remove", LocalizableStrings.NetRemoveCommand); command.AddArgument(ProjectArgument); command.AddCommand(RemovePackageParser.GetCommand()); command.AddCommand(RemoveProjectToProjectReferenceParser.GetCommand()); return(command); }
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());
private static Command ConstructCommand() { var command = new DocumentedCommand("remove", DocsLink, LocalizableStrings.NetRemoveCommand); command.AddArgument(ProjectArgument); command.AddCommand(RemovePackageParser.GetCommand()); command.AddCommand(RemoveProjectToProjectReferenceParser.GetCommand()); command.Handler = CommandHandler.Create <ParseResult>((parseResult) => parseResult.HandleMissingCommand()); return(command); }