Title: When displaying method overloads, show optional parameters as such · Issue #13728 · PowerShell/PowerShell · GitHub
Open Graph Title: When displaying method overloads, show optional parameters as such · Issue #13728 · PowerShell/PowerShell
X Title: When displaying method overloads, show optional parameters as such · Issue #13728 · PowerShell/PowerShell
Description: Summary of the new feature/enhancement As a user, when I inspect the overloads of a given .NET method, I want to know which parameters are optional, so I only pass arguments to them if actually needed. Accessing a method without invoking...
Open Graph Description: Summary of the new feature/enhancement As a user, when I inspect the overloads of a given .NET method, I want to know which parameters are optional, so I only pass arguments to them if actually nee...
X Description: Summary of the new feature/enhancement As a user, when I inspect the overloads of a given .NET method, I want to know which parameters are optional, so I only pass arguments to them if actually nee...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/13728
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"When displaying method overloads, show optional parameters as such","articleBody":"## Summary of the new feature/enhancement\r\n\r\nAs a user, when I inspect the overloads of a given .NET method, I want to know which parameters are _optional_, so I only pass arguments to them if actually needed.\r\n\r\nAccessing a method without invoking it (via `(...)`) conveniently shows all its overloads (signatures), but currently doesn't indicate which parameters are _optional_:\r\n\r\n```powershell\r\nAdd-Type -NameSpace demo -Name Foo -MemberDefinition 'public static void Bar(string param, int optParam = -1) { }'\r\n# Show the method signature.\r\n[demo.Foo]::Bar\r\n```\r\n\r\n_Current_ output - NO indication that `optParam` is optional):\r\n\r\n```\r\nOverloadDefinitions\r\n-------------------\r\nstatic void Bar(string param, int optParam)\r\n```\r\n\r\n_Desired_ output - clear indication that `optParam` is optional, ideally also with its default value, if technically feasible:\r\n\r\n```\r\nOverloadDefinitions\r\n-------------------\r\nstatic void Bar(string param, int optParam = -1)\r\n```\r\n\r\nNote: The **same representation should be used for `Get-Member`** output, as originally proposed in #7373.\r\nI suspect that the implementation is shared anyway.\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2020-10-01T15:25:14Z","url":"https://github.com/PowerShell/PowerShell/issues/13728"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2c8b7559-24df-776e-72ef-e5d6e6b1ed08 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1A0:1EB498:66ECB6:9566DE:6AFD8F2C |
| html-safe-nonce | 7150df36b787e07a351a04b4cb59266dcb09563c8ed9aeb61bbf3ec9f486ca16 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUEwOjFFQjQ5ODo2NkVDQjY6OTU2NkRFOjZBRkQ4RjJDIiwidmlzaXRvcl9pZCI6IjgwNjMzNDAzMTAxNzM2ODM1MDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7ace4e457c0334d2b370647446f81c1746e7a5fb72d53c49bd4328cb34d695a9 |
| hovercard-subject-tag | issue:712948513 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/13728/issue_layout |
| twitter:image | https://opengraph.githubassets.com/093a008816f1c449208a807233b42a62421cc03c117ff9af03b9f74c38fe821b/PowerShell/PowerShell/issues/13728 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/093a008816f1c449208a807233b42a62421cc03c117ff9af03b9f74c38fe821b/PowerShell/PowerShell/issues/13728 |
| og:image:alt | Summary of the new feature/enhancement As a user, when I inspect the overloads of a given .NET method, I want to know which parameters are optional, so I only pass arguments to them if actually nee... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width