Commandline: How to set send arguments for list

Created on 24 Apr 2019  路  4Comments  路  Source: commandlineparser/commandline

Hi,

I can't find any info in the specs on HOW exactly to send the arguments for this kind of parameter, if I didn't set any specific separator:

        [Option('a', "assemblies", Required = false, HelpText = "List of assemblies to process. Used for the NONE option")]
        public IEnumerable<string> Assemblies { get; set; }

The documentation doesn't contain any help in that direction :(

question

All 4 comments

Hi, me neither and that is what I am looking for right now!

Edit:
Well, there are plenty of Issues open which describe how to supply IEnumerable arguments which you simply do by -f files file1, file2, file3. This is possible if you add an Option IEnumerable files [...] to your options class.

Edit:
My bad. It's not "-f files file1, file2, file3", its "ShowFilesApp.exe -f file1 file2 file3"

Demo to show IEnumerable options and other usage: Online Demo

@moh-hassan Could be put in the readme/doc instead ^_^

@timotei
Thanks for suggestion.
It'll be added in redame file and wiki.

Was this page helpful?
0 / 5 - 0 ratings