Exemple #1
0
        public void Initialize(string[] args = null)
        {
            StartupScripts.RunAllScripts();

            if (args?.Length > 0)
            {
                if (args[0] == "--help")
                {
                    PrintCommands();
                    Environment.Exit(0);
                }
                RunStartupCommand(args);
            }

            Console.CancelKeyPress += (o, e) =>
            {
                Environment.Exit(0);
            };

            Write();

            string input = "";

            while ((input = GetInput()) != "exit")
            {
                if (RunsInternally(input))
                {
                    continue;
                }
                Run(input);
                Write();
            }
        }
Exemple #2
0
 public void UseStartupScript(string scriptPath)
 {
     StartupScripts.AddScript(scriptPath);
 }