/// <summary> /// Main from which the console is launched. /// </summary> /// <param name="args"></param> public static void Main(string[] args) { var ut = String.Empty; var p = new IaaProgram(args); try { p.StartConsole(); if (p.PrintHelp()) return; p.PrintToConsole("New console started!"); p.ParseProgramArgs(); //print settings p.PrintToConsole($"GetAsmIndicesCmdPort listening on port [{p.GetAsmIndicesCmdPort}]"); p.PrintToConsole($"GetTokenIdsCmdPort listening on port [{p.GetTokenIdsCmdPort}]"); p.PrintToConsole($"GetTokenNamesCmdPort listening on port [{p.GetTokenNamesCmdPort}]"); p.PrintToConsole($"GetTokenPageRankCmdPort listening on port [{p.GetTokenPageRankCmdPort}]"); p.PrintToConsole($"Resolve GAC Assembly names is [{p.AreGacAssembliesResolved}]"); p.PrintToConsole("type 'exit' to quit", false); //open ports p.LaunchListeners(); //park main for (; ; ) //ever { ut = Console.ReadLine(); if (string.IsNullOrWhiteSpace(ut)) continue; ut = ut.Trim(); if (String.Equals(ut, "exit", StringComparison.OrdinalIgnoreCase)) break; if (p.PrintHelp(new [] {ut})) { Console.WriteLine(p.RuntimeHelp()); } //handle command from the console. p.RtCommands(ut); } } catch (Exception ex) { p.PrintToConsole(ex); } if (string.IsNullOrWhiteSpace(ut) || !ut.StartsWith("exit")) { Console.ReadKey(); } }