public static int Main(string[] args) { ProgramUtils.Init(); if (WindowsUtils.IsWindows) { if (WindowsUtils.AttachConsole()) { return((int)RunCliRedirect(args)); } else { return((int)RunGui(args)); } } else { return((int)RunCli(args)); } }
/// <summary> /// Runs the application in command-line mode. /// </summary> /// <param name="args">The command-line arguments passed to the application.</param> /// <returns>The exit status code to end the process with.</returns> public static ExitCode RunCli(string[] args) { using var handler = new CliTaskHandler(); return(ProgramUtils.Run(args, handler, gui: false)); }