Skip to content

Remove duplicate remote server mediator code - #16027

Merged
Rob Holt (rjmholt) merged 2 commits into
PowerShell:masterfrom
PaulHigin:fix-mediator-dup
Sep 1, 2021
Merged

Rob Holt (rjmholt) merged 2 commits into
PowerShell:masterfrom
PaulHigin:fix-mediator-dup

Conversation

@PaulHigin

@PaulHigin Paul Higinbotham (PaulHigin) commented Aug 31, 2021 •

Copy link
Copy Markdown
Contributor

PR Summary

This PR removes duplicate server mediator classes, and refactors code to use a single mediator for StdIO based connections.
It also fixes parameter arguments so that configuration name is passed in correctly.

PR Context

There used to be two separate server mediator derivations, one each for OutOfProc and SSH transports. They both use StdIO for communication, but SSH had special code to deal with .NET implementation inconsistencies. But .NET addressed the issues and now both class derivations operate identically. So this PR creates a single StdIOProcessMediator class for both uses.

I also found a bug where the 'configurationName' parameter was not passed in correctly for HyperV mediators. I fixed the issues, but it turns out that the code path is not being used for PowerShellDirect VM connections, but I am not sure about container connections.
Actually, neither of these code paths are used because currently PowerShellDirect only works with WindowsPowerShell.

PR Checklist

@SteveL-MSFT Steve Lee (SteveL-MSFT) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one suggestion

@rjmholt
Rob Holt (rjmholt) merged commit 946341b into PowerShell:master Sep 1, 2021
xtqqczze pushed a commit to xtqqczze/PowerShell-PowerShell that referenced this pull request Sep 2, 2021
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) added Backport-7.2.x-Done CL-Engine Indicates that a PR should be marked as an engine change in the Change Log labels Sep 15, 2021
@ghost

Copy link
Copy Markdown

🎉v7.3.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.2.x-Done CL-Engine Indicates that a PR should be marked as an engine change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants