public PipelineExecutor(Runspace runSpace, string command) { this.pipeline = runSpace.CreatePipeline(command); this.pipeline.Commands[0].MergeMyResults(PipelineResultTypes.Error, PipelineResultTypes.Output); this.pipeline.Output.DataReady += this.OutputDataReady; this.pipeline.Error.DataReady += this.ErrorDataReady; }