Exemple #1
0
 protected PipelineBase(System.Management.Automation.Runspaces.Runspace runspace, string command, bool addToHistory, bool isNested) : base(runspace)
 {
     this._pipelineStateInfo   = new System.Management.Automation.Runspaces.PipelineStateInfo(System.Management.Automation.Runspaces.PipelineState.NotStarted);
     this._performNestedCheck  = true;
     this._executionEventQueue = new Queue <ExecutionEventQueueItem>();
     this._syncRoot            = new object();
     this.Initialize(runspace, command, addToHistory, isNested);
     this._inputStream  = new ObjectStream();
     this._outputStream = new ObjectStream();
     this._errorStream  = new ObjectStream();
 }
Exemple #2
0
 protected PipelineBase(System.Management.Automation.Runspaces.Runspace runspace, string command, bool addToHistory, bool isNested) : base(runspace)
 {
     this._pipelineStateInfo = new System.Management.Automation.Runspaces.PipelineStateInfo(System.Management.Automation.Runspaces.PipelineState.NotStarted);
     this._performNestedCheck = true;
     this._executionEventQueue = new Queue<ExecutionEventQueueItem>();
     this._syncRoot = new object();
     this.Initialize(runspace, command, addToHistory, isNested);
     this._inputStream = new ObjectStream();
     this._outputStream = new ObjectStream();
     this._errorStream = new ObjectStream();
 }
Exemple #3
0
 protected void SetPipelineState(System.Management.Automation.Runspaces.PipelineState state, Exception reason)
 {
     lock (this.SyncRoot)
     {
         if (state != this.PipelineState)
         {
             this._pipelineStateInfo = new System.Management.Automation.Runspaces.PipelineStateInfo(state, reason);
             RunspaceAvailability runspaceAvailability = this._runspace.RunspaceAvailability;
             this._runspace.UpdateRunspaceAvailability(this._pipelineStateInfo.State, false);
             this._executionEventQueue.Enqueue(new ExecutionEventQueueItem(this._pipelineStateInfo.Clone(), runspaceAvailability, this._runspace.RunspaceAvailability));
         }
     }
 }
Exemple #4
0
 protected PipelineBase(System.Management.Automation.Runspaces.Runspace runspace, CommandCollection command, bool addToHistory, bool isNested, ObjectStreamBase inputStream, ObjectStreamBase outputStream, ObjectStreamBase errorStream, PSInformationalBuffers infoBuffers) : base(runspace, command)
 {
     this._pipelineStateInfo   = new System.Management.Automation.Runspaces.PipelineStateInfo(System.Management.Automation.Runspaces.PipelineState.NotStarted);
     this._performNestedCheck  = true;
     this._executionEventQueue = new Queue <ExecutionEventQueueItem>();
     this._syncRoot            = new object();
     this.Initialize(runspace, null, false, isNested);
     if (addToHistory)
     {
         string commandStringForHistory = command.GetCommandStringForHistory();
         this._historyString = commandStringForHistory;
         this._addToHistory  = addToHistory;
     }
     this._inputStream          = inputStream;
     this._outputStream         = outputStream;
     this._errorStream          = errorStream;
     this._informationalBuffers = infoBuffers;
 }
Exemple #5
0
 protected PipelineBase(System.Management.Automation.Runspaces.Runspace runspace, CommandCollection command, bool addToHistory, bool isNested, ObjectStreamBase inputStream, ObjectStreamBase outputStream, ObjectStreamBase errorStream, PSInformationalBuffers infoBuffers) : base(runspace, command)
 {
     this._pipelineStateInfo = new System.Management.Automation.Runspaces.PipelineStateInfo(System.Management.Automation.Runspaces.PipelineState.NotStarted);
     this._performNestedCheck = true;
     this._executionEventQueue = new Queue<ExecutionEventQueueItem>();
     this._syncRoot = new object();
     this.Initialize(runspace, null, false, isNested);
     if (addToHistory)
     {
         string commandStringForHistory = command.GetCommandStringForHistory();
         this._historyString = commandStringForHistory;
         this._addToHistory = addToHistory;
     }
     this._inputStream = inputStream;
     this._outputStream = outputStream;
     this._errorStream = errorStream;
     this._informationalBuffers = infoBuffers;
 }
 internal PipelineStateEventArgs(System.Management.Automation.Runspaces.PipelineStateInfo pipelineStateInfo)
 {
     this._pipelineStateInfo = pipelineStateInfo;
 }
 internal PipelineStateEventArgs(System.Management.Automation.Runspaces.PipelineStateInfo pipelineStateInfo)
 {
     this._pipelineStateInfo = pipelineStateInfo;
 }
Exemple #8
0
 public ExecutionEventQueueItem(System.Management.Automation.Runspaces.PipelineStateInfo pipelineStateInfo, RunspaceAvailability currentAvailability, RunspaceAvailability newAvailability)
 {
     this.PipelineStateInfo           = pipelineStateInfo;
     this.CurrentRunspaceAvailability = currentAvailability;
     this.NewRunspaceAvailability     = newAvailability;
 }
Exemple #9
0
 public ExecutionEventQueueItem(System.Management.Automation.Runspaces.PipelineStateInfo pipelineStateInfo, RunspaceAvailability currentAvailability, RunspaceAvailability newAvailability)
 {
     this.PipelineStateInfo = pipelineStateInfo;
     this.CurrentRunspaceAvailability = currentAvailability;
     this.NewRunspaceAvailability = newAvailability;
 }
Exemple #10
0
 protected void SetPipelineState(System.Management.Automation.Runspaces.PipelineState state, Exception reason)
 {
     lock (this.SyncRoot)
     {
         if (state != this.PipelineState)
         {
             this._pipelineStateInfo = new System.Management.Automation.Runspaces.PipelineStateInfo(state, reason);
             RunspaceAvailability runspaceAvailability = this._runspace.RunspaceAvailability;
             this._runspace.UpdateRunspaceAvailability(this._pipelineStateInfo.State, false);
             this._executionEventQueue.Enqueue(new ExecutionEventQueueItem(this._pipelineStateInfo.Clone(), runspaceAvailability, this._runspace.RunspaceAvailability));
         }
     }
 }