예제 #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);
 }
예제 #2
0
파일: LocalPipeline.cs 프로젝트: b333z/Pash
        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);
        }
예제 #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);
            }
        }
예제 #4
0
 public PSObjectPipelineReader(IEnumerable input)
     : base()
 {
     _stream = new ObjectStream(input);
 }
예제 #5
0
 public PSObjectPipelineReader(ObjectStream stream)
     : base()
 {
     _stream = stream;
 }
예제 #6
0
 public ObjectStreamWriter(ObjectStream stream)
 {
     _stream = stream;
 }
예제 #7
0
파일: ObjectStream.cs 프로젝트: mauve/Pash
 public void Redirect(ObjectStream redirection)
 {
     _objectsStream = redirection._objectsStream;
     ClaimedBy = redirection.Owner;
 }
예제 #8
0
 public void Redirect(ObjectStream redirection)
 {
     _objectsStream = redirection._objectsStream;
     ClaimedBy      = redirection.Owner;
 }
예제 #9
0
 public ObjectStreamWriter(ObjectStream stream)
 {
     _stream = stream;
 }