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
I useNamingConventionBinder and all my options are class properties with names matching the option values, this simplifies passing the class instance to command handlers and any number of options can be added or used.
I am trying to do some processing before calling RootCommand.Invoke(), and I want to use RootCommand.Parse(), then inspect the ParseResult and find the options class used for options binding, I've not seen any docs on this, and browsing the ParseResult structure at runtime I do not see the options class either.
Is there a way to get access to the class instance used name binding in ParseResult, or some other way before calling Invoke()?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I use
NamingConventionBinder
and all my options are class properties with names matching the option values, this simplifies passing the class instance to command handlers and any number of options can be added or used.I am trying to do some processing before calling
RootCommand.Invoke()
, and I want to useRootCommand.Parse()
, then inspect theParseResult
and find the options class used for options binding, I've not seen any docs on this, and browsing theParseResult
structure at runtime I do not see the options class either.Is there a way to get access to the class instance used name binding in
ParseResult
, or some other way before callingInvoke()
?Beta Was this translation helpful? Give feedback.
All reactions