Esempio n. 1
0
 // TODO: hook the runtime to the Host for Debug and Error output
 internal PipelineCommandRuntime(PipelineProcessor pipelineProcessor)
 {
     PipelineProcessor = pipelineProcessor;
     MergeErrorToOutput = false;
     MergeUnclaimedPreviousErrors = false;
     OutputStream = new ObjectStream(this);
     ErrorStream = new ObjectStream(this);
     InputStream = new ObjectStream(this);
 }
Esempio n. 2
0
        public LocalPipeline(LocalRunspace runspace, string command)
            : base()
        {
            _runspace = runspace;
            _inputStream = new ObjectStream();
            _outputStream = new ObjectStream();
            _errorStream = new ObjectStream();
            _inputPipelineWriter = new ObjectStreamWriter(_inputStream);
            _outputPipelineReader = new PSObjectPipelineReader(_outputStream);
            _errorPipelineReader = new ObjectPipelineReader(_errorStream);
            _pipelineStateInfo = new PipelineStateInfo(PipelineState.NotStarted);

            if (!string.IsNullOrEmpty(command))
                Commands.Add(command);
        }
Esempio n. 3
0
        public LocalPipeline(LocalRunspace runspace, string command)
            : base()
        {
            _runspace             = runspace;
            _inputStream          = new ObjectStream();
            _outputStream         = new ObjectStream();
            _errorStream          = new ObjectStream();
            _inputPipelineWriter  = new ObjectStreamWriter(_inputStream);
            _outputPipelineReader = new PSObjectPipelineReader(_outputStream);
            _errorPipelineReader  = new ObjectPipelineReader(_errorStream);
            _pipelineStateInfo    = new PipelineStateInfo(PipelineState.NotStarted);

            if (!string.IsNullOrEmpty(command))
            {
                Commands.Add(command);
            }
        }
Esempio n. 4
0
 public PSObjectPipelineReader(IEnumerable input)
     : base()
 {
     _stream = new ObjectStream(input);
 }
Esempio n. 5
0
 public PSObjectPipelineReader(ObjectStream stream)
     : base()
 {
     _stream = stream;
 }
Esempio n. 6
0
 public ObjectStreamWriter(ObjectStream stream)
 {
     _stream = stream;
 }
Esempio n. 7
0
 public void Redirect(ObjectStream redirection)
 {
     _objectsStream = redirection._objectsStream;
     ClaimedBy = redirection.Owner;
 }
Esempio n. 8
0
 public void Redirect(ObjectStream redirection)
 {
     _objectsStream = redirection._objectsStream;
     ClaimedBy      = redirection.Owner;
 }
Esempio n. 9
0
 public ObjectStreamWriter(ObjectStream stream)
 {
     _stream = stream;
 }