Skip to content

Make the interface IDeepCloneable internal - #25552

Merged
Dongbo Wang (daxian-dbw) merged 2 commits into
PowerShell:masterfrom
daxian-dbw:make-it-private
Jun 2, 2025
Merged

Dongbo Wang (daxian-dbw) merged 2 commits into
PowerShell:masterfrom
daxian-dbw:make-it-private

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented May 13, 2025 •

Copy link
Copy Markdown
Member

PR Summary

This PR is a follow-up of the #25497.
The deep clone support in Microsoft.Management.UI.Internal should be made an implementation detail, so make the IDeepCloneable interface internal instead.

PR Checklist

@daxian-dbw Dongbo Wang (daxian-dbw) added CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log and removed CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log labels May 13, 2025
@daxian-dbw

Copy link
Copy Markdown
Member Author

Matthias Wolf (@mawosoft) please let me know if you any concerns.

@mawosoft

Copy link
Copy Markdown
Contributor

Dongbo Wang (@daxian-dbw) I don't have any concerns, it's just odd to pick one among many. None of these classes should probably be public.

Also, nit: If you make it internal, you can remove the suppression attribute.

@daxian-dbw

Copy link
Copy Markdown
Member Author

The suppression attribute is removed. The main reason to make the IDeepCloneable interface internal is to rule out the possibility that someone may implement this interface and feed such an object to Out-GridView to break the clone in any unexpected way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

May not strictly be needed, but also doesn't need to be public so if we have the option to minimize confusion we might as well.

@daxian-dbw Dongbo Wang (daxian-dbw) removed the Review - Needed The PR is being reviewed label Jun 2, 2025
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 4e03546 into PowerShell:master Jun 2, 2025
@daxian-dbw
Dongbo Wang (daxian-dbw) deleted the make-it-private branch June 2, 2025 22:18
@microsoft-github-policy-service

microsoft-github-policy-service Bot commented Jun 2, 2025 •

Copy link
Copy Markdown
Contributor

📣 Hey @Dongbo Wang (@daxian-dbw), how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

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.5.x-Done CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

Development

Successfully merging this pull request may close these issues.

5 participants