Closed
Description
I'm wondering if there's an elegant way of knowing which option has been set, so that a proper method can be called. For example:
p.Setup<List<string>>("a", "addproducts")
.Callback(items => arguments.NewNumbers = items);
p.Setup<List<string>>("r", "removeproducts")
.Callback(items => arguments.RemoveNumbers = items);
p.Parse(args);
if (arguments.NewNumbers != null)
return ConfirmProductNumbers(arguments);
else if (arguments.RemoveNumbers != null)
return ConfirmProductNumbers(arguments);
Thanks for your time.
Metadata
Metadata
Assignees
Labels
No labels