Adding [PSTransformAttribute] (Fixes #20112)#20299
Adding [PSTransformAttribute] (Fixes #20112)#20299StartAutomating wants to merge 7 commits intoPowerShell:masterfrom
[PSTransformAttribute] (Fixes #20112)#20299Conversation
Also adding type accelerator and tests for ArgumentTransformAttribute
|
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) |
Renaming ArgumentTransformAttribute to PSTransform (Fixes PowerShell#20112)
|
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) |
[PSTransformAttribute] (Fixes #20112)
|
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) |
Fixing expected accelerator name
This adds a general purpose Argument Transform Attribute to PowerShell.
While primarily present for scripting purposes, this attribute can also be used by compiled commands seeking to reduce their class footprint.
Fixes #20112
Argument Transforms are a powerful part of PowerShell that allow any parameter or variable to be transformed upon set.
This can allow us to redefine or reassign any variable based off of it's input.
PR Context
This came about as a suggestion for Wait-Event improvements (being able to handle an arbitrary [Timespan] without adding a second parameter).
Other scenarios include:
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.(which runs in a different PS Host).