Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
daxian-dbw merged 5 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:host-psstyleSteveL-MSFT/PowerShell:host-psstyleCopy head branch name to clipboard
Sep 10, 2021
Merged

Move GetOuputString() and GetFormatStyleString() to PSHostUserInterface as public API#16075
daxian-dbw merged 5 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:host-psstyleSteveL-MSFT/PowerShell:host-psstyleCopy head branch name to clipboard

Conversation

@SteveL-MSFT

@SteveL-MSFT 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 @daxian-dbw and @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

Comment thread src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs Outdated
@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.

Comment thread src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs Outdated
Comment thread src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs Outdated
@daxian-dbw 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
SteveL-MSFT and others added 2 commits September 9, 2021 17:34
…Interface.cs

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

Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
@daxian-dbw daxian-dbw merged commit dad7a34 into PowerShell:master Sep 10, 2021
@SteveL-MSFT SteveL-MSFT deleted the host-psstyle branch September 10, 2021 17:19
@iSazonov iSazonov added this to the 7.2.0-rc.1 milestone Sep 11, 2021
TravisEz13 pushed a commit that referenced this pull request Sep 29, 2021
@ghost

ghost commented Dec 16, 2021

Copy link
Copy Markdown

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

Handy links:

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.