red-gate / XmlDoc2CmdletDoc

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

Include type descriptions for array-typed parameters #51

Closed lordmilko closed 5 years ago

lordmilko commented 5 years ago

This pull request fixes an issue wherein XmlDoc2CmdletDoc will not include type descriptions for parameter type when the type is defined as an array (resulting in a warning that the type is missing a comment/description)

/// <summary>
/// <para type="description">blah</para>
/// </summary>
class Foo
{
}

class Test : Cmdlet
{
    // OK
    [Parameter]
    public Foo OK { get; set; }

    // Warning: Foo[]: No XML doc comment found, No description comment found
    [Parameter]
    public Foo[] NotOK { get; set; }
}

This PR also refactors the contents of the Command_Parmeters_Parameter_Type_ForTestManualElements and Command_Parmeters_Parameter_Type_ForTestMamlElements methods into a common method suitable for testing both of these scenarios with and without array types

ChrisLambrou commented 5 years ago

Thanks for this PR. Sorry for not responding sooner. I'm in the middle of a house move and struggling to find spare time! I'll take a look at this later today.

ChrisLambrou commented 5 years ago

I've just published a new version. It's busy indexing, but should now be available for download. Once again, sorry for the delay. And thanks for the contribution. :)