public void Dispose() { if (this.isDisposed) { return; } if (this.runspace != null) { if (this.openedRunspace) { this.runspace.Close(); } this.runspace.Dispose(); this.logger.LogInformation(HybridStrings.HybridInfoTotalCmdletTime(this.connectionType.ToString(), this.totalProcessedTime.TotalSeconds)); } this.isDisposed = true; }