Add ConvertTo-CliXml and ConvertFrom-CliXml cmdlets#21063
Add ConvertTo-CliXml and ConvertFrom-CliXml cmdlets#21063iSazonov merged 10 commits intoPowerShell:masterfrom
ConvertTo-CliXml and ConvertFrom-CliXml cmdlets#21063Conversation
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 @sdwheeler Please create HelpUri-s for new cmdlwts.
test/powershell/Modules/Microsoft.PowerShell.Utility/XMLCommand.Tests.ps1
Outdated
Show resolved
Hide resolved
|
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) |
JamesWTruher
left a comment
There was a problem hiding this comment.
Really nice, just some comments about the tests
test/powershell/Modules/Microsoft.PowerShell.Utility/clixml.tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/XMLCommand.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/XMLCommand.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/XMLCommand.Tests.ps1
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/XMLCommand.Tests.ps1
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/XMLCommand.Tests.ps1
Show resolved
Hide resolved
|
@JamesWTruher Thanks for the PR feedback, I have made the changes to the tests. Let me know if you want anything else changed 🙂 |
|
@sdwheeler We need HelpURI for the new cmdlets. Please create. |
sdwheeler
left a comment
There was a problem hiding this comment.
Please commit the HelpUri changes.
src/Microsoft.PowerShell.Commands.Utility/commands/utility/XmlCommands.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Utility/commands/utility/XmlCommands.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Sean Wheeler <sean.wheeler@microsoft.com>
src/Microsoft.PowerShell.Commands.Utility/commands/utility/XmlCommands.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Utility/commands/utility/XmlCommands.cs
Outdated
Show resolved
Hide resolved
|
📣 Hey @ArmaanMcleod, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
|
@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).