PowerShellInstance createInstance( IShellUI ui, string remoteComputerName) { var instance = new PowerShellInstance(ui, remoteComputerName); instance.ExecDone += onExecDone; instance.ExitRequested += onExitRequested; return instance; }
public void Execute(string[] argStrings, IShellUI ui, ICore core) { try { string sourcePath = argStrings[1]; string outputPath = argStrings[2]; string fileName = argStrings[3]; Compilation compilation = new Compilation(sourcePath, outputPath, fileName); } catch (Exception e) //TODO: Better exception handling { Console.WriteLine("Compilation Error\n"); Console.WriteLine(e); Console.WriteLine("Please try again! type -h for help.\n"); } }
public void Execute(string[] argStrings, IShellUI ui, ICore core) { string path = argStrings[1]; try { if (path != null) { core.ChangeDirectory(path); ui.DisplayChangeDirectory(); } } catch (Exception e) { Console.WriteLine(e); throw; } }
public void Execute(string[] argStrings, IShellUI ui, ICore core) { ui.DisplayHelp(); }
public ShellController(IShellUI ui, ICore core) { Ui = ui; Core = core; ui.CommandEntered += Ui_CommandEntered; }
public PowerShellEngine(IShellUI ui) { host = new CustomHost(ui); createRunspace(host); }
public CustomHostUI(IShellUI shellUI) { this.shellUI = shellUI; }
public void Execute(string[] argStrings, IShellUI ui, ICore core) { Process.GetCurrentProcess().Kill(); }
public CustomHost(IShellUI shellUI) { this.shellUI = shellUI; UI = new CustomHostUI(shellUI); }
public PowerShellEngine(IShellUI ui) { this.ui = ui; instances.AddFirst(createInstance(ui, null)); }