static bool DoHelp(CmdArg x) { foreach (CmdArg arg in CmdParser.GetCmdList()) { Console.WriteLine(arg.GetShortCommand() + " " + arg.GetLongCommand() + "\t" + arg.GetDescription()); } return(false); }
public static void Init() { folderLocationArg = new CmdArg("-d", "--directory", "the dir where the sauce is located", 1); fileLocationArg = new CmdArg("-f", "--file", "the (zip) file containing (-d will contain custom extraction folder)", 1); HelpArg = new CmdArg("-h", "--help", "Calls your mom"); HelpArg.SetFinishedParsingCllbk(DoHelp); }
/// <summary> /// Adds a argument to the arglist /// </summary> /// <returns>idx of the item in the list</returns> public static void AddCmdArg(CmdArg arg) { argList.Add(arg); }