Пример #1
0
        public static int Main(string[] args)
        {
            ProgramUtils.Init();

            using var handler = new CliTaskHandler();
            return((int)ProgramUtils.Run(args, handler, gui: false));
        }
Пример #2
0
 /// <summary>
 /// Runs the application in command-line mode with special-case handling for retroactively attached Windows consoles.
 /// </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 RunCliRedirect(string[] args)
 {
     using var handler = new CliTaskHandler();
     try
     {
         Console.WriteLine();
         return(ProgramUtils.Run(args, handler, gui: false));
     }
     finally
     {
         if (handler.Verbosity != Verbosity.Batch)
         {
             Console.WriteLine();
             Console.Write(Environment.CurrentDirectory + @">");
         }
     }
 }
Пример #3
0
 /// <summary>
 /// Runs the application in command-line mode with special-case handling for retroactively attached Windows consoles.
 /// </summary>
 /// <param name="args">The command-line arguments passed to the application.</param>
 /// <returns>The exit status code to end the process with.</returns>
 private static ExitCode RunCliWindows(string[] args)
 {
     using (var handler = new CliTaskHandler())
     {
         try
         {
             Console.WriteLine();
             return(Run(args, handler, gui: false));
         }
         finally
         {
             if (handler.Verbosity != Verbosity.Batch)
             {
                 Console.WriteLine();
                 Console.Write(Environment.CurrentDirectory + @">");
             }
         }
     }
 }
Пример #4
0
 /// <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));
 }
Пример #5
0
 /// <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>
 private static ExitCode RunCli(string[] args)
 {
     using (var handler = new CliTaskHandler())
         return(Run(args, handler, gui: false));
 }