Exemplo n.º 1
0
 public void ShutdownConsole()
 {
     if (ScriptingConsole != null)
     {
         ScriptingConsole.Dispose();
     }
 }
Exemplo n.º 2
0
 public void OnMaxVisibleColumnsChanged()
 {
     if (powerShellHost != null)
     {
         int columns = ScriptingConsole.GetMaximumVisibleColumns();
         powerShellHost.OnMaxVisibleColumnsChanged(columns);
     }
 }
Exemplo n.º 3
0
 bool SafeRunPowerShellInitializationScripts(Solution solution)
 {
     try {
         var runner = new InitializationScriptRunner(solution, ScriptExecutor);
         return(runner.ExecuteInitScriptsAsync(Token).WaitAndGetResult());
     } catch (Exception ex) {
         LoggingService.LogError("SafeRunPowerShellInitializationScripts error", ex);
         ScriptingConsole.WriteLine("\n" + ex.Message, ScriptingStyle.Error);
         return(true);
     }
 }
Exemplo n.º 4
0
 void PowerShellHostExited(object sender, EventArgs e)
 {
     try {
         ReloadPackageSources();
         OnMaxVisibleColumnsChanged();
         InitializeLazyScriptExecutor();
         commandExpansion.CommandExpansion = CreateCommandExpansion();
         InitializePackageScriptsForOpenSolution();
     } catch (Exception ex) {
         string message = GettextCatalog.GetString("Unable to initialize remote PowerShell host. {0}", ex.Message);
         ScriptingConsole.WriteLine(message, ScriptingStyle.Error);
         LoggingService.LogError("PowerShellHostExited error", ex);
     }
 }
Exemplo n.º 5
0
 void ProcessUserCommands()
 {
     while (true)
     {
         string line = ScriptingConsole.ReadLine(autoIndentSize);
         if (line != null)
         {
             ProcessLine(line);
             WritePrompt();
         }
         else
         {
             break;
         }
     }
 }
Exemplo n.º 6
0
 public void ExecuteCommand(string command)
 {
     ScriptingConsole.SendLine(command);
 }
Exemplo n.º 7
0
 void WriteLine(string message)
 {
     ScriptingConsole.WriteLine(message, ScriptingStyle.Out);
 }
Exemplo n.º 8
0
 public void WritePrompt()
 {
     ScriptingConsole.Write(prompt, ScriptingStyle.Prompt);
 }
Exemplo n.º 9
0
 public void Clear()
 {
     ScriptingConsole.Clear();
 }
Exemplo n.º 10
0
        void WritePowerShellIsNotInstalledMessage()
        {
            string message = GetPowerShellIsNotInstalledMessage();

            ScriptingConsole.WriteLine(message, ScriptingStyle.Error);
        }
Exemplo n.º 11
0
 PythonConsole(ScriptingConsole console, IControlDispatcher dispatcher)
     : base(console, dispatcher)
 {
     this.dispatcher        = dispatcher;
     console.MemberProvider = this;
 }
        public void Run()
        {
            string message = GetDotNetCoreRuntimeIsNotInstalledMessage();

            ScriptingConsole.WriteLine(message, ScriptingStyle.Error);
        }