I've been trying to pass parameters to a BackgroundService as a Windows Service. Ideally I would like to use a ServiceController to do this when starting the service. This seems impossible as the Service only accepts Arguments during the Main(string[] args) which is called when the service begins when the computer turns on rather than when the ExecuteAsync is called when the service is Started.
The setup I am using is from this tutorial https://youtu.be/PzrTiz_NRKA?t=1904
The current solution I have implemented uses a configuration file which the Service reads when its starts, this allows for some dynamic configuration but is not ideal. Any Advice is appreciated!