コード例 #1
0
 internal ConsoleColorProxy(EditorServicesPSHostUserInterface hostUserInterface)
 {
     if (hostUserInterface == null)
     {
         throw new ArgumentNullException("hostUserInterface");
     }
     _hostUserInterface = hostUserInterface;
 }
コード例 #2
0
 /// <summary>
 /// Creates a new instance of the ConsoleServicePSHost class
 /// with the given IConsoleHost implementation.
 /// </summary>
 /// <param name="powerShellContext">
 /// An implementation of IHostSupportsInteractiveSession for runspace management.
 /// </param>
 /// <param name="hostDetails">
 /// Provides details about the host application.
 /// </param>
 /// <param name="hostUserInterface">
 /// The EditorServicesPSHostUserInterface implementation to use for this host.
 /// </param>
 /// <param name="logger">An ILogger implementation to use for this host.</param>
 public EditorServicesPSHost(
     PowerShellContextService powerShellContext,
     HostDetails hostDetails,
     EditorServicesPSHostUserInterface hostUserInterface,
     ILogger logger)
 {
     this.Logger            = logger;
     this.hostDetails       = hostDetails;
     this.hostUserInterface = hostUserInterface;
     this.hostSupportsInteractiveSession = powerShellContext;
     this.powerShellContext = powerShellContext;
 }