コード例 #1
0
ファイル: OutConsole.cs プロジェクト: 5l1v3r1/PowerShell-7
        /// <summary>
        /// Just hook up the LineOutput interface.
        /// </summary>
        protected override void BeginProcessing()
        {
            PSHostUserInterface console    = this.Host.UI;
            ConsoleLineOutput   lineOutput = new ConsoleLineOutput(console, false, new TerminatingErrorContext(this));

            ((OutputManagerInner)this.implementation).LineOutput = lineOutput;

            MshCommandRuntime mrt = this.CommandRuntime as MshCommandRuntime;

            if (mrt != null)
            {
                mrt.MergeUnclaimedPreviousErrorResults = true;
            }

            if (Transcript)
            {
                _transcribeOnlyCookie = Host.UI.SetTranscribeOnly();
            }

            // This needs to be done directly through the command runtime, as Out-Default
            // doesn't actually write pipeline objects.
            base.BeginProcessing();

            if (Context.CurrentCommandProcessor.CommandRuntime.OutVarList != null)
            {
                _outVarResults = new List <PSObject>();
            }
        }
コード例 #2
0
ファイル: OutHostCommand.cs プロジェクト: modulexcite/pash-1
        protected override void BeginProcessing()
        {
            ConsoleLineOutput output = new ConsoleLineOutput(base.Host.UI, this.paging, !PSHost.IsStdOutputRedirected, new TerminatingErrorContext(this));

            ((OutputManagerInner)base.implementation).LineOutput = output;
            base.BeginProcessing();
        }
コード例 #3
0
        /// <summary>
        /// Just hook up the LineOutput interface.
        /// </summary>
        protected override void BeginProcessing()
        {
            var lineOutput = new ConsoleLineOutput(Host, _paging, new TerminatingErrorContext(this));

            ((OutputManagerInner)this.implementation).LineOutput = lineOutput;
            base.BeginProcessing();
        }
コード例 #4
0
ファイル: OutConsole.cs プロジェクト: 5l1v3r1/PowerShell-7
        /// <summary>
        /// Just hook up the LineOutput interface.
        /// </summary>
        protected override void BeginProcessing()
        {
            PSHostUserInterface console    = this.Host.UI;
            ConsoleLineOutput   lineOutput = new ConsoleLineOutput(console, _paging, new TerminatingErrorContext(this));

            ((OutputManagerInner)this.implementation).LineOutput = lineOutput;
            base.BeginProcessing();
        }
コード例 #5
0
        protected override void BeginProcessing()
        {
            ConsoleLineOutput output = new ConsoleLineOutput(base.Host.UI, false, !PSHost.IsStdOutputRedirected, new TerminatingErrorContext(this));

            ((OutputManagerInner)base.implementation).LineOutput = output;
            MshCommandRuntime commandRuntime = base.CommandRuntime as MshCommandRuntime;

            if (commandRuntime != null)
            {
                commandRuntime.MergeUnclaimedPreviousErrorResults = true;
            }
            base.BeginProcessing();
        }