nessos/UnionArgParser — pull request #11 by bentayloruk (2014-06-11 19:22:51+00:00)
Title: Use argument union case value names in .Usage() generated documentation

I thought it would be cool if the UAP Usage() generated documentation could include names for the values provided with an argument (rather than just the type name).

For example, rather than this:

`--listener : specify a listener.`

I want to see this:

`--listener : specify a listener.`

This PR adds support for this by utilising the F# 3.1 discriminated union case field name support. If we detect that field names have been specified, we use them. You can see this in action in a new test, also included in the PR.

Couple of things to note:

* The test for the presence of field names will fail if someone starts all their field names with `Item`! :) Not sure if reflection will tell us directly of their presence. Minor, but one to check.
* I stuck the field names on the `ArgInfo` record. It may be better on another type, but I'm not super familiar with the code base and model yet. Let me know if you think it should be elsewhere.
* I've not check to see if there are other places this should be used outside of usage (like error messages).