public static void Main(string[] args) { Initializer.AllInit(); UCI uci = new UCI(); uci.MainLoop(); }
protected void timeExecute(String sInput, UInt64 qTrials) { using (var command = new UCI()) { var sw = TimerStart(nameof(command.Execute), qTrials); var qTrial = 0UL; for (var bContinue = true; bContinue && qTrial < qTrials; qTrial++) { bContinue = command.Execute(sInput); } TimerStop(sw, qTrial); } }
private static void Main(String[] args) { using (var command = new UCI()) { try { if (UCI.IsDebug) { #if NoteLaunchAndExit LogInfo(Level.note, $"Launched at {DateTime.Now:yyyy-MM-dd HH:mm:ss.ff}"); #endif } var sCommand = Join(sSpace, args).Trim(); var bContinue = IsNullOrEmpty(sCommand) || command.Execute(sCommand); while (bContinue) { Log(sPrompt); var sLine = Console.ReadLine(); if (sLine is null) { bContinue = false; } else { LogWriteLine(sLine); bContinue = command.Execute(sLine.Trim()); } } #if NoteLaunchAndExit LogInfo(Level.note, $"Exited at {DateTime.Now:yyyy-MM-dd HH:mm:ss.ff}"); #endif } catch (ApplicationException ex) { #if StackTrace LogInfo(Level.error, ex.ToString()); #else LogInfo(Level.error, ex.Message); #endif } catch (Exception ex) { LogInfo(Level.error, ex.ToString()); } } #if DEBUG //Console.Write("Press Enter"); //Console.ReadLine(); #endif }