red-gate / XmlDoc2CmdletDoc

Create cmdlet XML help files from XML doc comments
Other
65 stars 24 forks source link

Adding support for nullable types #3

Closed ChrisLambrou closed 8 years ago

ChrisLambrou commented 8 years ago

For a parameter of a nullable type, the base code help text displayed:

PS> Get-Help Test-ManualElements -param NullableParameter -NullableParameter <Nullable1>`

The revised code will recognize when a parameter is a nullable type and display the underlying type instead. In the test example that is an integer:

PS> Get-Help Test-ManualElements -param NullableParameter -NullableParameter <int>

The fact that the type is nullable is typically of no interest to the end-user so this is a much more useful output.

ChrisLambrou commented 8 years ago

This is a duplicate of #2, but targets a branch rather than master which matches our internal review process. This is a bit silly, but getting our build agents to target different VCS sources is a massive pain right now, and I don't expect it to change any time soon. :disappointed:

ChrisLambrou commented 8 years ago

Using this tool on another internal project is something on my todo list, and I know they have Nullable types in their cmdlets. I'll have a word with them before merging this, to see what they think. If they have reasons to prefer something like Nullable[int] over simply int, then I'll look into making the behaviour configurable, either from the app.config file or more likely via a command-line switch.

ChrisLambrou commented 8 years ago

Thanks for this submission. No one here came up with any reason for not merging this as is. :smile: