Пример #1
0
        /// <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;
            }

            _savedTranscribeOnly = Host.UI.TranscribeOnly;
            if (Transcript)
            {
                Host.UI.TranscribeOnly = true;
            }

            // 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 ArrayList();
            }
        }
Пример #2
0
 internal PromptHandler(string s, ConsoleLineOutput cmdlet)
 {
     if (string.IsNullOrEmpty(s))
     {
         throw PSTraceSource.NewArgumentNullException("s");
     }
     this.promptString  = s;
     this.callingCmdlet = cmdlet;
 }
Пример #3
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();
 }
Пример #4
0
 internal PromptHandler(string s, ConsoleLineOutput cmdlet)
 {
     if (string.IsNullOrEmpty(s))
     {
         throw PSTraceSource.NewArgumentNullException("s");
     }
     this.promptString = s;
     this.callingCmdlet = cmdlet;
 }
Пример #5
0
        /// <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();
        }