Skip to content

Move GetOuputString() and GetFormatStyleString() to PSHostUserInterface as public API - #16075

Merged
Dongbo Wang (daxian-dbw) merged 5 commits into
PowerShell:masterfrom
SteveL-MSFT:host-psstyle
Sep 10, 2021
Merged

Dongbo Wang (daxian-dbw) merged 5 commits into
PowerShell:masterfrom
SteveL-MSFT:host-psstyle

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Sep 9, 2021 •

Copy link
Copy Markdown
Member

PR Summary

Fix #14387

Follow up on #14397. These two APIs were previously internal and used by the ConsoleHost. However, this means that every host would need to have similar code to handle ANSI rendering correctly. Discussion with Dongbo Wang (@daxian-dbw) and Rob Holt (@rjmholt) was to move them to PSHostUserInterface so they can be used by the dotnet-interactive Jupyter kernel and the vscode-powershell extension.

PR Context

PR Checklist

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

I'm going to make a change, for public hosts, some of the parameters don't make any sense. I'll have a simpler public version and keep the current one as internal.

@daxian-dbw Dongbo Wang (daxian-dbw) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Sep 10, 2021
…Interface.cs

Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
…Interface.cs

Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
@ghost

Copy link
Copy Markdown

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

Handy links:

TrapGodBrim pushed a commit to TrapGodBrim/PowerShell that referenced this pull request Jan 19, 2022
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-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose the Utils.GetOutputString as a public method for C# developers to work with OutputRendering

5 participants