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(); } }
public void UseStartupScript(string scriptPath) { StartupScripts.AddScript(scriptPath); }