internal static InvocationEventQueue Create(PowerShellContext powerShellContext, PromptNest promptNest)
        {
            var eventQueue = new InvocationEventQueue(powerShellContext, promptNest);

            eventQueue.CreateInvocationSubscriber();
            return(eventQueue);
        }
        internal PSReadLinePromptContext(
            PowerShellContext powerShellContext,
            PromptNest promptNest,
            InvocationEventQueue invocationEventQueue,
            PSReadLineProxy readLineProxy)
        {
            _promptNest           = promptNest;
            _powerShellContext    = powerShellContext;
            _invocationEventQueue = invocationEventQueue;
            _consoleReadLine      = new ConsoleReadLine(powerShellContext);
            _readLineProxy        = readLineProxy;

            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                return;
            }

            _readLineProxy.OverrideReadKey(
                intercept => ConsoleProxy.UnixReadKey(
                    intercept,
                    _readLineCancellationSource.Token));
        }