public static Command GetCommand() { var command = new Command("list", LocalizableStrings.NetListCommand); command.AddArgument(SlnOrProjectArgument); command.AddCommand(ListPackageReferencesCommandParser.GetCommand()); command.AddCommand(ListProjectToProjectReferencesCommandParser.GetCommand()); return(command); }
public static Command List() => Create.Command( "list", LocalizableStrings.NetListCommand, Accept.ZeroOrOneArgument() .With( name: CommonLocalizableStrings.SolutionOrProjectArgumentName, description: CommonLocalizableStrings.SolutionOrProjectArgumentDescription) .DefaultToCurrentDirectory(), ListPackageReferencesCommandParser.ListPackageReferences(), ListProjectToProjectReferencesCommandParser.ListProjectToProjectReferences(), CommonOptions.HelpOption());
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); }
public ListCommand() : base( name: "list", help: LocalizableStrings.NetListCommand, options: new Option[] { CommonOptions.HelpOption(), ListPackageReferencesCommandParser.ListPackageReferences(), ListProjectToProjectReferencesCommandParser.ListProjectToProjectReferences(), }, arguments: Accept.ZeroOrOneArgument() .With( name: CommonLocalizableStrings.SolutionOrProjectArgumentName, description: CommonLocalizableStrings.SolutionOrProjectArgumentDescription) .DefaultToCurrentDirectory()) { }