internal PSReadLinePromptContext(
            PowerShellContextService powerShellContext,
            PromptNest promptNest,
            InvocationEventQueue invocationEventQueue,
            PSReadLineProxy readLineProxy)
        {
            _promptNest           = promptNest;
            _powerShellContext    = powerShellContext;
            _invocationEventQueue = invocationEventQueue;
            _consoleReadLine      = new ConsoleReadLine(powerShellContext);
            _readLineProxy        = readLineProxy;

            _readLineProxy.OverrideReadKey(
                intercept => ConsoleProxy.SafeReadKey(
                    intercept,
                    _readLineCancellationSource.Token));
        }
 private InvocationEventQueue(PowerShellContextService powerShellContext, PromptNest promptNest)
 {
     _promptNest        = promptNest;
     _powerShellContext = powerShellContext;
     _runspace          = powerShellContext.CurrentRunspace.Runspace;
 }
        internal static InvocationEventQueue Create(PowerShellContextService powerShellContext, PromptNest promptNest)
        {
            var eventQueue = new InvocationEventQueue(powerShellContext, promptNest);

            eventQueue.CreateInvocationSubscriber();
            return(eventQueue);
        }
Exemplo n.º 4
0
 public virtual bool IsDebuggerStopped(PromptNest promptNest, Runspace runspace)
 {
     return(runspace.Debugger.InBreakpoint || (promptNest.IsRemote && promptNest.IsInDebugger));
 }