You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.Reflection.TargetException: 'Object does not match target type.'
at System.Reflection.RuntimeMethodInfo.CheckConsistency(Objecttarget)
at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Objectobj,BindingFlagsinvokeAttr,Binderbinder,Object[]parameters,CultureInfoculture)
at System.Reflection.RuntimeMethodInfo.Invoke(Objectobj,BindingFlagsinvokeAttr,Binderbinder,Object[]parameters,CultureInfoculture)
at System.Reflection.RuntimePropertyInfo.SetValue(Objectobj,Objectvalue,BindingFlagsinvokeAttr,Binderbinder,Object[]index,CultureInfoculture)
at System.Reflection.RuntimePropertyInfo.SetValue(Objectobj,Objectvalue,Object[]index)
at Fclp.Internals.CommandLineOption`1.Bind(ParsedOptionvalue)
at Fclp.FluentCommandLineParser.ParseOptions(IEnumerable`1options, List`1parsedOptions,CommandLineParserResultresult)
at Barberians.Program.Main(String[]args)in C:\Users\Nathan Ferreira\Desktop\Barberians\Barberians\Program.cs:line 28
I think there needs to be a bit of extra smartness around the reflection usage as the property it is trying to set the value on does not exist on the generic type FluentCommandLineParser is constructed with.
Since i have two classes, i need to parse CLI args to specfic classes:
My feature request is:
Allow to parse CLI Arguments into
RootClass
and sub classes properties like:Currently if i try to do this, causes exception.
Since C1 and C2 instances are not null.
In real code:
The text was updated successfully, but these errors were encountered: