예제 #1
0
        public EmbeddedTerminal(TermWindowPackage package, ServiceToolWindow windowPane)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            this.package    = package;
            this.windowPane = windowPane;

            if (this.windowPane.Frame is IVsWindowFrame2 windowFrame)
            {
                var events = new WindowFrameEvents(windowFrame, this);
                windowFrame.Advise(events, out var cookie);
                events.Cookie = cookie;
            }
        }
        public EmbeddedTerminal(TermWindowPackage package, TermWindowPane pane, EmbeddedTerminalOptions options, Task <Stream> rpcStreamTask) : base(package, pane)
        {
            this.options = options;
            this.rpc     = new AsyncLazy <JsonRpc>(() => GetJsonRpcAsync(rpcStreamTask), package.JoinableTaskFactory);

            if (options.WorkingDirectory == null)
            {
                // Use solution directory
                this.solutionUtils = new AsyncLazy <SolutionUtils>(GetSolutionUtilsAsync, package.JoinableTaskFactory);

                // Start getting solution utils but don't block on the result.
                // Solution utils need MEF and sometimes it takes long time to initialize.
                this.solutionUtils.GetValueAsync().FileAndForget("WhackWhackTerminal/GetSolutionUtils");
            }
        }
예제 #3
0
        public TerminalRenderer(TermWindowPackage package, TermWindowPane pane)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            this.package = package;
            this.pane    = pane;

            if (this.pane.Frame is IVsWindowFrame2 windowFrame)
            {
                new WindowFrameEvents(windowFrame)
                {
                    Closed = (sender, e) => OnClosed(),
                };
            }

            this.scriptingObject = new TerminalScriptingObject(this, package);
            this.scriptingObject.TerminalInit += OnTerminalInit;
        }
예제 #4
0
 public EmbeddedTerminalService(TermWindowPackage package)
 {
     this.package = package;
 }
 public TerminalEvent(TermWindowPackage package, EmbeddedTerminal terminal)
 {
     this.package  = package;
     this.terminal = terminal;
 }