public Main(string[] arguments, int ti = -1, Action <int, string> u = null) { ArgumentObject args = ArgumentObject.Parse(arguments); Restart :; if (args.arguments.mn == "nvl") { NovelDownload(args.arguments, ti, u); } else if (args.arguments.mn == "ani") { AnimeDownload(args.arguments, ti, u); } else { if (!searchMN(ref args)) { u?.Invoke(ti, "Error: could not parse command (Failure to parse website to ani/nvl flag.. you can retry with ani/nvl flag)"); ADLUpdates.CallError(new Exception("Error: Could not parse command (mn selector)")); return; } else { goto Restart; } } }
private void ParseArgs(string[] x, int id) { ArgumentObject parsedArgs = ArgumentObject.Parse(x); if (parsedArgs.arguments.help) { PrintHelp(); return; } }
static void parg(string[] args, int id) { ArgumentObject parsedArgs = ArgumentObject.Parse(args); if (parsedArgs.arguments.help) { PrintHelp(); return; } ADLCore.Interfaces.Main mn = new ADLCore.Interfaces.Main(parsedArgs, id, new Action <int, string>(UpdateTask)); }