I have added command line support to my topshelf program as follows:
HostFactory.Run(hostConfigurator =>
{
hostConfigurator.AddCommandLineDefinition("params", f => { startParams = f; });
hostConfigurator.ApplyCommandLine();
}
And this works just fine.
When I install it as a service I was hoping in the installed service 'start parameters' it would serve the same purpose but it doesn't.
Can anyone tell me how to access the 'start parameters' from TopShelf?
I wish to install the same service multiple times (with different instance names) which are different by the start parameters and I also want to use it to pass in testing values.
I guess just simply accessing these programmatically for a standard service will probably point me in the right direction.
thanks.