ValueListAttribute with Required & HelpText

Jun 2, 2010 at 6:28 PM

How possible would it be to have ValueListAttribute also inherit these parameters from BaseOptionAttribute? I know it doesn't really make sense to directly inherit due to the naming convention but just those two parameters would make things a lot easier. Required would be difficult to work out except that you only need one value in the List<> for it to pass. HelpText might also be difficult because there is really no short/longname field to use, or it would always be a longname where you just specify "filename" or whatever. You could even use maximumelements to make your filename01, 02, etc like the examples I've seen if you wanted to get more complex.

There are ways around these limitations so it isn't a pressing need. HelpText.AddPreOptionsLine() can be used instead of the HelpText parameter. I've done a requirement check inside ParseArguments to fulfill the missing Required parameter. I only did that because I have an unusual either/or requirement scenario where the valuelist or an option is required but did not want to specify both.


May 18, 2012 at 7:00 AM

Dear user,

please check documentation (it was recently updated).

Anyway [ValueList] captures data not mapped from other [Option]s and so it make no sense inherit from the [BaseOption].

Please reformulate what you say about HelpText, is it not clear.

Thank you for writing and sorry for this late reply.

Sometime some question ... escapes ... !