System.CommandLine and injection of IOptions (not Option!) type
I'm trying to work out how to use the hosting and dependency injection parts of System.CommandLine to inject IOptions configuration settings into my app via the command line. See https://github.com/dotnet/command-line-api/issues/1858#issuecomment-1254653273. Short version: how can I make System.CommandLine binding or dependency injection work to change the value of a typed IOptions instance?
GitHub
Dependency injection confusion - How to use CommandLineBuilder, Use...
I'm lost in the weeds with dependency injection here. using System.CommandLine; using System.CommandLine.Builder; using System.CommandLine.Hosting; using System.CommandLine.Invocation; usin...
0 Replies