-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalitythe issue is for cleaning up the code with no impact on functionalityResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-DevEx-SDKhosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of moduleshosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of modules
Description
Copied from MicrosoftDocs/PowerShell-Docs#4472
This is a bug in the API documentation for AddScript(). The API documentation comes from /// comments in the source code to this must be fixed in the source code. The example shown in the docs is using AddCommand() instead of AddScript. Also the line break and indentation could be improved for readability.
Both overloads are affected:
PowerShell/src/System.Management.Automation/engine/hostifaces/PSCommand.cs
Lines 153 to 156 in 659dff0
| /// <code> | |
| /// PSCommand command = new PSCommand("get-process"). | |
| /// AddCommand("foreach { $_.Name }", true); | |
| /// </code> |
PowerShell/src/System.Management.Automation/engine/hostifaces/PSCommand.cs
Lines 195 to 198 in 659dff0
| /// <code> | |
| /// PSCommand command = new PSCommand("get-process"). | |
| /// AddCommand("foreach { $_.Name }", true); | |
| /// </code> |
Metadata
Metadata
Assignees
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-Code Cleanupthe issue is for cleaning up the code with no impact on functionalitythe issue is for cleaning up the code with no impact on functionalityResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-DevEx-SDKhosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of moduleshosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of modules