TestimoX

API Reference

Class

PooledPowerShell

Namespace TestimoX.Infrastructure
Assembly TestimoX
Implements
IDisposable
Modifiers sealed

Wrapper for PowerShell objects that returns the underlying runspace to the pool when disposed.

Inheritance

  • Object
  • PooledPowerShell

Constructors

public PooledPowerShell(PowerShell ps, Runspace runspace, RunspacePool pool) #

Creates a pooled PowerShell wrapper.

Parameters

ps System.Management.Automation.PowerShell requiredposition: 0
PowerShell instance.
runspace System.Management.Automation.Runspaces.Runspace requiredposition: 1
Runspace acquired from the pool.
pool TestimoX.PowerShell.RunspacePool requiredposition: 2
Runspace pool to return the runspace to.

Methods

public virtual Void Dispose() #
Returns: Void

Disposes the PowerShell and returns its runspace to the pool.

Properties

public PowerShell PowerShell { get; } #

Underlying PowerShell instance.