We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
It is possible to parse clustered options.
This is done by convention, nothing has to be done on the configuration side.
The user will automatically be able to use clustered options if the following conditions are met:
using MatthiWare.CommandLine; using MatthiWare.CommandLine.Core.Attributes; static void Main(string[] args) { var parser = new CommandLineParser<ClusteredOptions>(); var result = parser.Parse(args); var options = result.Result; Console.WriteLine($"A: {options.A}"); Console.WriteLine($"B: {options.B}"); Console.WriteLine($"C: {options.C}"); Console.ReadKey(); } public class ClusteredOptions { [Name("a"), Required] public int A { get; set; } [Name("b"), Required] public int B { get; set; } [Name("c"), Required] public int C { get; set; } }
Input: > Example.exe -abc 123 Output: A: 123 B: 123 C: 123