Add ConvertTo-CliXml and ConvertFrom-CliXml cmdlets - #21063
Conversation
Ilya (iSazonov)
left a comment
There was a problem hiding this comment.
LGTM with minor comments
| /// Implements ConvertTo-CliXml command. | ||
| /// </summary> | ||
| [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2243:AttributeStringLiteralsShouldParseCorrectly")] | ||
| [Cmdlet(VerbsData.ConvertTo, "CliXml", HelpUri = "")] |
There was a problem hiding this comment.
/cc Sean Wheeler (@sdwheeler) Please create HelpUri-s for new cmdlwts.
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
James Truher (JamesWTruher)
left a comment
There was a problem hiding this comment.
Really nice, just some comments about the tests
|
James Truher (@JamesWTruher) Thanks for the PR feedback, I have made the changes to the tests. Let me know if you want anything else changed 🙂 |
|
Sean Wheeler (@sdwheeler) We need HelpURI for the new cmdlets. Please create. |
Sean Wheeler (sdwheeler)
left a comment
There was a problem hiding this comment.
Please commit the HelpUri changes.
Co-authored-by: Sean Wheeler <sean.wheeler@microsoft.com>
|
📣 Hey Armaan Mcleod (@ArmaanMcleod), how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
|
Armaan Mcleod (@ArmaanMcleod) Thanks for your contribution! |
PR Summary
Fixes #3898
Add
ConvertTo-CliXmlandConvertFrom-CliXmlcmdlets to work with CliXml objects in memory without needing to read/write to file system.PR Context
Parameter sets
Usage
Also included
internal static string Serialize(IList<object> source, int depth, bool enumerate)inPSSerializerAPI. This was to be able to enumerate and serialize objects one at a time instead of writing one top level object.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.ConvertTo-CliXmlandConvertFrom-CliXmlcmdlets MicrosoftDocs/PowerShell-Docs#10773(which runs in a different PS Host).