Example #1
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);
        }
Example #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);
            }
        }