コード例 #1
0
 static bool DoHelp(CmdArg x)
 {
     foreach (CmdArg arg in CmdParser.GetCmdList())
     {
         Console.WriteLine(arg.GetShortCommand() + " " + arg.GetLongCommand() + "\t" + arg.GetDescription());
     }
     return(false);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 /// <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);
 }