Replies: 1 comment
-
In 2.0.0-beta4.22272.1, use an overload that gives the InvocationContext to the handler: command-line-api/src/System.CommandLine/Handler.Action.cs Lines 14 to 20 in 209b724 command-line-api/src/System.CommandLine/Handler.Func.cs Lines 23 to 29 in 209b724 Then make the handler read InvocationContext.ParseResult and query the values from the ParseResult:command-line-api/src/System.CommandLine/Parsing/ParseResult.cs Lines 162 to 168 in 209b724 In later versions of System.CommandLine (which are not yet at nuget.org), the SetHandler overloads that take IValueDescriptor<T> parameters have already been deleted, but the InvocationContext approach is still available (although the type isn't called InvocationContext any more). |
Beta Was this translation helpful? Give feedback.
-
Right now SetHandler only supports up to eight options. Is there a way to exceed this limit? Or will it be increased in the future?
Beta Was this translation helpful? Give feedback.
All reactions