My goal is to use arguments from the command line (namely, a username + token) later in one of the controllers.
- This blog explained a lot of useful setup, but not how to actually use custom arguments other than
--environment
. - I've found ways to pass command line arguments into the Startup class, but not how to get it into the controller.
- Upon looking at the docs, I cannot correctly pass the parameters to controller classes (the sample file also conflates the Program and Startup classes, so I am not sure how to handle that in my own code).
Ultimately I need to have some value configured at the beginning of the app, and this value needs to be accessed by controller methods later. Any alternatives that achieve this are also greatly appreciated.